Commit Graph

419 Commits

Author SHA1 Message Date
cjs
788bcc9857 Fix bug in sysctl net.inet.ip.forwsrcrt handing: now you can read it
if securelevel > 0. (Thanks, cgd.)
1997-02-19 08:30:04 +00:00
mrg
4c8bfe2630 pseudo-device ipfilter brings in PFIL_HOOKS. 1997-02-18 20:49:32 +00:00
thorpej
b21c166228 ioctl cmd arguments are u_long, not int. Pointed out by
Fred L. Templin <templin@nas.nasa.gov>
1997-01-29 02:16:23 +00:00
mikel
9be91c7fb4 fix my typo; found by Klaus Klein <kleink@layla.inka.de> 1997-01-17 17:06:06 +00:00
mikel
313f6180e6 add prototypes for ethers(3) functions; fixes PR 2471.
fix suggested by Jason Thorpe.
1997-01-17 08:17:57 +00:00
gwr
e1cb27e32f sync with if_ether.h 1997-01-15 18:19:35 +00:00
thorpej
9df1988ac8 Implement the IP_RECVIF socket option: supply a datagram packet's incoming
interface using a sockaddr_dl in a control mbuf.

Implement SO_TIMESTAMP for IP datagrams.

Move packet information option processing into a generic function
so that they work with multicast UDP and raw IP as well as unicast UDP.

Contributed by Bill Fenner <fenner@parc.xerox.com>.
1997-01-11 05:21:07 +00:00
veego
d61e3f8c25 ipl[attach|detach]->ipfilter[attach|detach] for the pseudo-device change 1997-01-08 21:45:39 +00:00
mrg
9cc6a2a495 remove some old debugging statements. 1997-01-07 10:51:01 +00:00
veego
473d4f54d1 Add $NetBSD$ id's and restore the orginal Id's. 1997-01-05 21:32:18 +00:00
veego
25bcda3b52 Add $NetBSD$ id's and restore the orginal Id's. 1997-01-05 21:32:17 +00:00
veego
47517abd07 Add $NetBSD$ id's and restore the orginal Id's. 1997-01-05 21:32:14 +00:00
mrg
c1067a3f4b initial import of darren reed's ip-filter, version 3.1.2. 1997-01-05 13:47:59 +00:00
mrg
5e5291f97b always reassign ip after calling function. 1996-12-20 09:08:16 +00:00
mrg
04ce281a19 in pfil_hooks: always reassign ip after calling hook. 1996-12-20 09:08:14 +00:00
mrg
15eaee8d6f in pfil_hooks: always reassign ip after calling hook. 1996-12-20 08:39:29 +00:00
mrg
a24be0b669 remove pfil_bad. 1996-12-20 08:39:27 +00:00
mycroft
ef60fc0bad Minor change to a comment. 1996-12-11 01:55:50 +00:00
mycroft
315bb1ab50 Fix RTT scaling problems introduced with Brakmo and Peterson changes. 1996-12-10 18:20:19 +00:00
mycroft
a26a19aeda Return EAGAIN if binding with no specified port and the pool is empty. 1996-12-10 11:38:42 +00:00
thorpej
096b0d6c6e In udp_output(), sanity check the length of the packet to be transmitted.
If it's larger than IP_MAXPACKET, return an error condition.
Based on a patch from Bill Fenner <fenner@parc.xerox.com>
1996-10-25 06:35:16 +00:00
thorpej
59bbc2199e In rip_output(), sanity check the length of the packet to be transmitted.
If it's larger than IP_MAXPACKET, return an error condition.
Based on a patch from Bill Fenner <fenner@parc.xerox.com>
1996-10-25 06:33:36 +00:00
thorpej
e55c8a9c7e Before concatenating frags, sanity check the length of the packet. If it's
larger than IP_MAXPACKET, discard it.
Based on a patch from Bill Fenner <fenner@parc.xerox.com>
1996-10-25 06:30:32 +00:00
thorpej
65c188b3c7 Make length and offset fields unsigned. From Kevin M. Lahey <kml@nas.nasa.gov>
Add a counter to IP stats, to count packets which are discarded on the
grounds that they are too large.
1996-10-25 06:24:16 +00:00
thorpej
ee34a9ab6d Make length and offset fields unsigned. From Kevin M. Lahey <kml@nas.nasa.gov> 1996-10-25 06:22:24 +00:00
veego
b962d9a3eb Fix a panic from the pfil_hooks. 1996-10-22 11:27:05 +00:00
ws
31bdb14ed5 Rename recently checked in KGDB to IPKDB to resolve conflicts with older KGDB 1996-10-16 19:32:08 +00:00
christos
ad67e04154 backout previous kprintf change 1996-10-13 16:50:51 +00:00
christos
5545959d0b backout previous kprintf changes 1996-10-13 02:03:00 +00:00
is
08899f4a1b Fix a mbuf leak in ip_output().
Scenario: If ip_insertoptions() prepends a new mbuf to the chain, the
bad: label's m_freem(m0) still would free only the original mbuf chain
if the transmission failed for, e.g., no route to host; resulting in
one lost mbuf per failed packet. (The original posting included a
demonstration program).

Original report of this bug was by jinmei@isl.rdc.toshiba.co.jp
(JINMEI Tatuya) on comp.bugs.4bsd.
1996-10-11 18:19:08 +00:00
christos
6d7ad25bea printf -> kprintf, sprintf -> ksprintf 1996-10-10 23:12:43 +00:00
christos
2768f040b3 - fix NSIP; it referenced non-existing functions. 1996-10-10 23:04:26 +00:00
thorpej
63a2506f79 Merge netbsd-1-2 branch back into mainline. 1996-10-09 01:15:04 +00:00
ws
093a00671f Add (and change) machine independent files for KGDB support 1996-09-30 16:16:45 +00:00
perry
17fcad6b2c commit fix in pr 2772 -- the IP input code was assuming that the
reserved (must be zero) flag must necessarily be zero. We now define
an IP_RF (by analogy to IP_DF and IP_MF) and mask it out when necessary.
1996-09-21 19:44:32 +00:00
mycroft
d6121891ef Overlay inp_faddr and inp_laddr into the header prototype. 1996-09-17 17:10:20 +00:00
mycroft
457b1b1333 Make sure the sin_zero fields are filled. 1996-09-16 17:45:17 +00:00
mycroft
9bfa240a98 Hash unconnected PCBs. 1996-09-15 18:11:06 +00:00
mrg
a5f00f16bc move the packet filter hooks in to a saner location. while i'm here, rename
PACKET_FILTER to PFIL_HOOKS.
1996-09-14 14:40:20 +00:00
mrg
4b851a2d9b remove an unused variable. 1996-09-14 12:35:07 +00:00
mrg
df4a844f44 forward decl. struct mbuf (for now). 1996-09-12 23:11:40 +00:00
explorer
f5a52c4260 Move an #ifdef _KERNEL up above all the packet filter stuff. This
could very well break the packet filter stuff, but it will make things
like rcp.c compile, and rcp.c should not need to include sys/mbuf.h
to do so...
1996-09-12 22:56:03 +00:00
mycroft
da2cd7eb82 If we're in SYN-SENT or SYN-RECEIVED state, don't reset the keepalive
timer until we transition to ESTABLISHED state.  Suggested by TCP/IP
vol 3.
1996-09-10 23:26:05 +00:00
mycroft
9bb1acd303 Rework the token bucket filter to use a list of packets rather than a static
array.  Also, fix several memory leaks.  From Bill Fenner.
1996-09-09 17:14:04 +00:00
mycroft
23437fc3d2 Cosmetic changes, some from Bill Fenner. 1996-09-09 17:09:50 +00:00
mycroft
62a6cce9ca Add in_nullhost() and in_hosteq() macros, to hide some protocol
details.  Also, fix a bug in TCP wrt SYN+URG packets.
1996-09-09 14:51:07 +00:00
mycroft
f5c7d8bcc1 Save 68 bytes of the packet for ICMP, not 64. From Laine Stump, PR 2296. 1996-09-08 15:49:43 +00:00
mrg
e27343e07d fix a couple of minor nits after discussions with jason. 1996-09-07 04:55:16 +00:00
mrg
ae47956db0 add packet filter interface code. see pfil(9) for more details. you
need the PACKET_FILTER option to enable this code.  currently, ipfilter
version 3.1.1-beta has been converted to use this new interface.
1996-09-06 05:07:43 +00:00
perry
94a217e163 Commit PR 2671, which adds an "IPNOPRIVPORTS" config option that turns
off the code that normally only allows root to bind low TCP
ports. Useful on firewalls and such.
1996-09-05 18:10:03 +00:00
thorpej
3ca11aa1ad Fix some DIAGNOSTIC printf() formats; ntohl() provides a 32-bit quantity,
and should be printed with %x, not %lx.
1996-08-14 03:46:44 +00:00
neil
78bddbd393 Prototypes and definitions for ICMP Router Discovery, From FreeBSD.
rdisc coming soon! :-)
1996-08-03 15:48:18 +00:00
cgd
9764a289cd print result of ntohl/htonl as a long. (makes -Wformat work on the
Alpha.)
1996-07-10 18:13:35 +00:00
chuck
26cf9de9d5 ported ATM to FreeBSD 2.2-960612-SNAP 1996-07-03 17:17:10 +00:00
chuck
cc499a99d9 change:
- change asock to rxhand and adjust all for this [esp atm_input]
1996-06-29 20:07:05 +00:00
chuck
a08c95305d fixes/new stuff:
[1] if user tries to enter in a bogus PVC don't leave it in the routing
        table ... remove it
[2] change ioctl arg to include rxso for lower layer
[3] add hooks (inside "NATM" ifdef) for native mode atm sockets so that
        they don't clash with IP PVCs.   [i am still debugging the native
        mode atm socket protosw code]
1996-06-26 04:18:44 +00:00
mycroft
865bfae299 Return ENOPROTOOPT rather than picking pseudo-random error values.
Don't allow SIOCGET{VIF,SG}CNT from sockets other than the multicast router.
Restructure rip_ctloutput() like ip_ctloutput(), and fix memory leaks.
1996-06-23 12:12:44 +00:00
chuck
d9c6fd68b8 network support for ATM networks (ATM == Async Transfer Mode, not
Automatic Teller Machine).

Currently supports PVCs only (no ATM ARP either).
1996-06-22 01:47:35 +00:00
pk
ecbb3b2eb2 Prototype new rip_*() functions. 1996-05-28 23:27:04 +00:00
mycroft
91ac291d97 Move some code into a separate rip_bind() function. 1996-05-24 19:03:13 +00:00
mycroft
9347e648d8 udp_output() doesn't actually take control data, so don't pretend it does. 1996-05-23 17:05:45 +00:00
mycroft
f399db63a4 Make sure the control mbufs are freed in all cases. 1996-05-23 17:03:27 +00:00
mycroft
60395beed8 Fix a race condition in PRU_DISCONNECT.
Rearrange the code to deal with unconnected sockets slightly.
Other minor changes.
1996-05-23 16:22:32 +00:00
mycroft
e930766cdc Minor changes. 1996-05-23 16:13:19 +00:00
mycroft
aee4be7a7f Minor changes to make this more like other protocols. Also, fix some return
values.
1996-05-23 16:12:15 +00:00
mycroft
a8ba1d063c A few style changes to match netiso and netns. 1996-05-22 14:42:27 +00:00
mycroft
49d52c9b1c Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.
1996-05-22 13:54:55 +00:00
mrg
4e25d1d20b if the sender set a cksum, check it, regardless if we care to
generate and send them ourselves.  from rich stevens.
1996-05-20 16:56:20 +00:00
mycroft
e901286aad When sending an ARP request, use the interface address for the route, rather
than the first address assigned.  This gives slightly different behaviour in
the presence of aliases.  From Bill Fenner, via Pete Bentley.
1996-05-11 12:59:55 +00:00
thorpej
4edabe2501 Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 02:40:22 +00:00
jonathan
24a8c21b53 fixes for -Wall -Wmissing-prototypes:
include <sys/systm.h> to get a prototyped declaration of printf().
include <netinet/in.h> to get a prototyped declaration of in_cksum().
1996-04-08 19:55:37 +00:00
christos
dd7163922a Fix db_printf formats 1996-03-30 21:53:19 +00:00
christos
2769793c13 Fix printf format args. 1996-03-16 23:53:58 +00:00
mrg
32cdb91fa3 two more local addr changes, all done differently now (idea from charles) 1996-02-26 23:16:42 +00:00
mrg
86b9b4d6be if we are connecting *to* an address of any local interface, default the
local address of the socket to the same address.
1996-02-26 08:25:47 +00:00
christos
b2cc81b8fe Fix PR/2095 options MROUTING did not compile. 1996-02-18 18:58:32 +00:00
christos
14d9cd33af netinet prototypes 1996-02-13 23:40:59 +00:00
mycroft
0a47ede0fe Ignore FIN if not yet connected. 1996-01-31 05:56:56 +00:00
mycroft
ac01b2f206 Add a comment describing the previous. 1996-01-31 05:42:37 +00:00
mycroft
a4e1bceb84 If we close from FIN_WAIT_2 state, make sure we don't leave the socket
around forever if we don't get a final FIN.  From Arne Juul, PR 1659.
1996-01-31 05:37:29 +00:00
mycroft
67e78477db Build a hash table of PCBs. Hash function needs tweaking. 1996-01-31 03:49:23 +00:00
thorpej
535abd80a2 Add a net.inet.ip.directed-broadcast sysctl as suggested by
Darren Reed <darrenr@vitruvius.arbld.unimelb.edu.au> in PR #1227.
This change is slightly different than the one submitted by Darren in
that the DIRECTED_BROADCAST compile-time option will behave like it used
to so that existing configurations utilizing it won't have to change.
1996-01-16 04:17:30 +00:00
thorpej
4b359df8c4 Add net.inet.ip.forwsrcrt: if zero, the system will not forward
source-routed packets.  Note this value is protected by kernel security
level; it can only be changed if securelevel < 1.
1996-01-15 21:11:46 +00:00
pk
c069674663 Handle PRU_CONTROL (David Maltz; PR#1664). 1995-11-30 16:42:18 +00:00
cgd
dfad729a16 make netinet work on systems where pointers and longs are 64 bits
(like the alpha).  Biggest problem: IP headers were overlayed with
structure which included pointers, and which therefore didn't overlay
properly on 64-bit machines.  Solution: instead of threading pointers
through IP header overlays, add a "queue element" structure to do
the threading, and point it at the ip headers.
1995-11-21 01:07:34 +00:00
thorpej
7884abf9e5 Implement tcp_sysctl(). Add a sysctl option to enable/disable RFC1323
extensions to TCP.  From John Kohl <jtk@kolvir.blrc.ma.us>.
1995-09-30 07:02:00 +00:00
mycroft
873ed30f83 so_pcb should be a void *. 1995-08-17 02:57:20 +00:00
mycroft
5482957905 splnet --> splsoftnet 1995-08-12 23:59:09 +00:00
mycroft
68735fd022 Encapsulate the test for sending a notification in a macro, sb_notify(). 1995-08-04 01:09:57 +00:00
cgd
5b435dbf05 null mbuf pointer could cause system crash; avoid it. From
Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de>.
1995-07-01 03:44:55 +00:00
cgd
23e75a550d fix typo 1995-06-26 08:46:16 +00:00
cgd
f90cf78fba convert pcb lists to CIRCLEQs, so that the end can be looked at more
easily, and so that the original (insque/remque) logic can be effectively
mimiced.  (This fixes a bug in the previous set of list changes.)
also (since terminator is no longer null) reinstate uninitted list checks,
but mark them XXX.
1995-06-18 20:01:08 +00:00
mycroft
cd7edee1ca in_pcbnotify*() don't return anything. 1995-06-12 06:49:55 +00:00
mycroft
351cfd5ed8 Fix bogon in previous. 1995-06-12 06:48:54 +00:00
mycroft
22687aa834 Change in_pcbnotify*() to take an errno value. Make inetctlerrmap[] an
array on ints, not u_chars.
1995-06-12 06:46:34 +00:00
mycroft
10a4696964 Oops. Make source quench work again. 1995-06-12 06:24:21 +00:00
mycroft
c88cf97b34 Clear the MFC entry's statistical counters when doing an upcall. 1995-06-12 03:05:12 +00:00
mycroft
6897f39ae9 Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.
1995-06-12 00:46:47 +00:00
mycroft
f9337c3f1e Oops. Decrement rtt earlier. 1995-06-11 21:36:04 +00:00
mycroft
2be9b519ac As suggested by Brakmo and Peterson:
* Don't add the extra 1/8 of the mss when ramping up the congestion window.
* Scale the RTT values slightly to adjust for rounding errors.
* Set the lower bound of the RTO to RTT+2.
1995-06-11 20:39:22 +00:00
mycroft
4ce5bb3dd4 Check for inflated congestion window during header prediction, per Bramko and
Peterson.
1995-06-11 09:36:28 +00:00
mycroft
3a8e9c62b8 Remove ip_ifmatrix completely. 1995-06-07 16:01:15 +00:00
cgd
d4f62dcb69 update from Ignatios Souvatzis 1995-06-07 00:13:52 +00:00
mycroft
4906fd756f Simplify ipip_input() a bit. Don't blow away the vif cache if someone sends
us a bogus packet.
1995-06-04 07:38:19 +00:00
mycroft
e30d6fd798 Simply tbf_control() a bit. 1995-06-04 07:20:47 +00:00
mycroft
b8c4ea6580 Eliminate compiler warnings. 1995-06-04 06:55:30 +00:00
mycroft
e201372b7d For consistency, set sin_len for SIOC{ADD,DEL}MULTI. 1995-06-04 06:46:05 +00:00
mycroft
51a0da73db Remove one more bogus cast. 1995-06-04 06:03:53 +00:00
mycroft
41703012d6 Don't cast things unnecessarily. 1995-06-04 05:58:20 +00:00
mycroft
0a99592372 Clean up many more casts. 1995-06-04 05:06:49 +00:00
mycroft
06a9ea20e8 Clean up a lot of ugly casts. 1995-06-04 04:35:29 +00:00
mycroft
489f42a2d8 Dynamically allocate the deencapsulation interfaces. Abstract the code to
reset a vif into a separate function.
1995-06-02 04:23:05 +00:00
mycroft
4516e8c845 Don't use INADDR_* constants in case labels. 1995-06-01 21:46:27 +00:00
mycroft
eb216fd6c2 Avoid byte-swapping IP addresses at run time. 1995-06-01 21:35:34 +00:00
mycroft
2eaf92b3e5 Add missing ntohl() in multicast test. 1995-06-01 15:59:04 +00:00
mycroft
ba9883ec57 Integrate multicast 3.5 distribution, with several bugs fixed and general
cleanup.  This is a (working) snapshot of work in progress.
1995-05-31 21:50:34 +00:00
mycroft
a54e2ffa20 Add IPPROTO_IP. Fix comment for IP_MULTICAST_IF. 1995-05-31 07:39:33 +00:00
mycroft
f49ddb8b04 Implement IGMP v2. Based on the Multicast 3.5 distribution. 1995-05-31 06:08:17 +00:00
cgd
dd614d8474 parenthesize macro arg usage 1995-05-16 05:26:36 +00:00
cgd
0bfc08ac63 oops; forgot a '{' 1995-05-15 02:09:58 +00:00
cgd
05af191f3b spacing fixups and KNF. #define ether address size, so it's not
hardcoded as '6' all over.
1995-05-15 01:30:44 +00:00
cgd
cd172a4d08 KNF 1995-05-15 01:25:21 +00:00
cgd
b4cd363b69 simplify ip_output() out-of-memory condition slightly, and style nits. 1995-05-15 01:24:53 +00:00
cgd
e7164bb2fd "routine" precedence has a value of 0. 1995-05-15 01:22:44 +00:00
cgd
2c1e3c655f drop (and record) malformed IP fragments. Fixes pr 1030 (differently). 1995-05-14 08:23:00 +00:00
cgd
c03b53c2e8 spacing cleaup. also, minor type mixup fixups. 1995-04-17 05:32:52 +00:00
chopps
999aa2cc32 update arc_input() proto to match reality. 1995-04-14 17:09:39 +00:00
cgd
1e2fe7fa41 oops; missed the chance to fix a cast, that then becamse a compiler warning. 1995-04-13 20:09:23 +00:00
cgd
80929f8527 be a bit more careful and explicit with types. (basically a large no-op.) 1995-04-13 06:35:38 +00:00
cgd
b5b72d26ea be a bit more careful and explicit with types. (basically a large no-op.) 1995-04-13 06:25:36 +00:00
mycroft
8b77f9cd5f Remove some explicit references to loif. 1995-04-11 04:30:47 +00:00
mycroft
2f30839b62 Remove now unneeded #ifdef. Prototype new function. 1995-04-10 00:06:54 +00:00
mycroft
99cd177c88 Add a common function to initialize ARP-related variables. `Insired'
by Garrett Wollman.
1995-04-07 22:26:04 +00:00
briggs
6efcd1b6d4 KERNEL -> _KERNEL 1995-03-29 21:57:43 +00:00
jtc
7c04233887 KERNEL -> _KERNEL 1995-03-26 20:23:52 +00:00
glass
e553431826 Default linger time was 120 clock ticks instead of the intended
2 minutes.
[Bug pointed out by Wright/Stevens in TCP/IP Illustrated Vol II]
1995-03-21 07:48:14 +00:00
glass
af55380e5a remove references to arptnew. fix spelling error 1995-03-06 19:06:05 +00:00
glass
14e57cebfa Fix for two bad tests in the raw IP socket input code. Only affected
raw sockets that were bound to a local address and/or connected to a
foreign address.   Fix from Dan McDonald <danmcd@itd.nrl.navy.mil>
1995-03-02 09:33:40 +00:00
chopps
7908b4858d add prototypes 1995-03-02 09:14:38 +00:00
glass
48b5b94c4f fix some typos. from frank@fwi.uva.nl (Frank van der Linden) 1995-02-27 09:10:24 +00:00
glass
f634dc196b preliminary arcnet support. uses lame but RFC address resolution 1995-02-23 07:19:49 +00:00
mycroft
153c5e083f Fix a condition where we sometimes sent a FIN too early. Also, a small
optimization.
1995-01-23 20:18:35 +00:00
mycroft
4d0a512f67 Fix mbuf leak in rip_ctloutput(). 1995-01-12 06:23:45 +00:00
mycroft
22ab689dfe Fix off by one error in in_socktrim(), reported by Karn Fox. 1994-11-03 14:57:35 +00:00
mycroft
63bb09e6da Don't return received data to the user until the initial handshake is complete.
Also use TCPS_HAVEESTABLISHED() in a few other places.
1994-10-14 16:01:48 +00:00
mycroft
b94d5a36e7 Increase the default window size to 16k. 1994-10-13 14:26:15 +00:00
deraadt
d6bfeb6b71 failure to bind to a reserved port should return EACCES not EPERM. 1994-09-29 02:31:35 +00:00
mycroft
f21c4cc68a Fix byte-order bug in printf() statement. 1994-07-27 12:36:09 +00:00
cgd
e4cafbc7da kill conflicting externs 1994-07-24 02:41:27 +00:00
cgd
cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
chopps
9f0089f3ce config.new hack for if_ether.c for lack of an `and' in the grammer
and protect some ether specific code in in.c
1994-06-21 03:54:27 +00:00
brezak
669769d3e0 Update to version 2 mrouting; from pre-4.4lite NetBSD + 4.4 mods 1994-06-09 16:01:53 +00:00
brezak
de3a00ee3d Patch to fix ip cksum errors. From mccanne@ee.lbl.gov (Steven McCanne). 1994-06-09 15:59:47 +00:00
mycroft
f130f244e7 Remove a spurious splx(). 1994-06-04 08:29:51 +00:00
mycroft
57de85fb31 Modify the loopback checks to deal with multiple interfaces. 1994-06-04 08:13:23 +00:00
gwr
2b888e2990 Back out some of my changes which Keith Sklower convinced me are
unnecessary.  Leaving in just the essentials of the fix.
1994-06-04 03:15:09 +00:00
gwr
b02ab73537 Avoid accidentaly creating permanent entries at time==0
Routes created with RTM_ADD (i.e. manually added) are
permanent so leave their expiration time set to zero.
1994-06-03 02:54:26 +00:00
cgd
21c67feb12 i forgot a four letter word... 1994-05-14 06:25:32 +00:00
cgd
fa080c8fad multiple inclusion protection, for the rpc headers 1994-05-14 05:46:35 +00:00
mycroft
07b4f2ab54 Update to 4.4-Lite networking code, with a few local changes. 1994-05-13 06:02:48 +00:00
cgd
e0db92993a change timeout/untimeout/wakeup/sleep/tsleep args to void * 1994-04-29 23:15:51 +00:00
mycroft
87b39add50 As I described this on comp.protocols.tcp-ip:
I've found a problem with the TCP delayed ack algorithm.  If the writer's
buffer becomes full before sending an entire window, the writer will stop
and the ack will be delayed and the transmission will be stalled pending
a timeout on (and transmission of) the delayed ack.

As an experiment, I've applied the following patch to my (NetBSD) kernel,
and it alleviates the problem.

The worst case for this change is that the writer sets the PSH bit on
every outgoing packet, in which case delayed ack is effectively disabled.
This is not an issue of correctness, however, and since most vendors use
the PSH bit a bit more intelligently, it doesn't seem like a serious
problem.
1994-04-25 19:16:53 +00:00
mycroft
efa2794f99 Dummy arpintr() for now. 1994-04-18 23:25:57 +00:00
glass
a3b042140f revised nfs diskless support. uses bootp+rpc to gather parameters 1994-04-18 06:18:05 +00:00
mycroft
55a96d2a3f Acks with no data should have the highest sequence number sent. 1994-04-12 18:09:47 +00:00
mycroft
08230400b7 Patch from James Carlson to fix TCP stalls. 1994-04-12 18:07:46 +00:00
glass
ceb45a1b88 add missing explicit type declaration for func argument 1994-03-14 07:49:44 +00:00
mycroft
94b2718bd1 PARANOID --> DIAGNOSTIC for inexpensive tests. 1994-02-14 21:43:33 +00:00
mycroft
252495f006 Format police. 1994-02-10 18:46:04 +00:00
mycroft
bf98a55f37 Deprecate af.h. 1994-02-10 17:25:03 +00:00
hpeyerl
d7038296be Multicast is no longer optional. 1994-02-02 05:58:50 +00:00
brezak
8243f1bb37 Fix some cases of NOT dealing with m_pkthdr's. This code is still suspect though, at least this fixes some panics. 1994-01-29 11:57:45 +00:00
deraadt
ad4dc0ab15 need a stub 'struct socket;' for a prototype 1994-01-28 13:46:02 +00:00
cgd
78e6a7e18d renumber the IP setsockopt options back to the Reno/Net2 versions,
moving the multicast options after them
From: Mike Karels <karels@BSDI.COM>
(grr.)
1994-01-26 01:26:37 +00:00
deraadt
ba2361b102 ether_output() & ether_input() take ether_type as a net-short.
AF_UNSPEC does not swap byte order of ether_type.
NOTE: this requires driver changes
1994-01-23 23:42:50 +00:00
brezak
e568c13be8 Fix arguments to ip_getmoptions. 1994-01-19 21:36:56 +00:00
brezak
17ea2355b4 Fix some prototype detected warnings/errors. 1994-01-18 03:26:53 +00:00
brezak
38253dddb8 Patch for ip-multicast bugs from mccanne@ee.lbl.gov (Steven McCanne) 1994-01-18 02:36:53 +00:00
mycroft
627b841797 Change the counters to be all the same type -- u_long. 1994-01-10 23:27:39 +00:00
mycroft
e287c3d10e Fix function name. 1994-01-10 23:20:07 +00:00
mycroft
b79490fcca Should compile now with or without `options MULTICAST'. 1994-01-10 20:14:14 +00:00
mycroft
699565c826 Don't prototype this until it's safe. 1994-01-10 00:31:11 +00:00
mycroft
222ebaf50e Prototype the rest. 1994-01-09 01:06:02 +00:00
mycroft
321b0c6090 More prototypes. 1994-01-08 23:50:41 +00:00
mycroft
12c88c1841 Remove some extra prototypes. 1994-01-08 23:26:40 +00:00
mycroft
26b5333c74 Slight rearrangement. 1994-01-08 23:19:48 +00:00
mycroft
0ff93a444b Prototypes. 1994-01-08 23:17:18 +00:00
mycroft
e43117185e Prototypes. 1994-01-08 23:07:16 +00:00
mycroft
4fe12e6e88 Fix some inconsistent spacing; spaces at the end of lines, etc. 1994-01-08 21:21:28 +00:00
cgd
9834dab564 kill COMPAT_OLDSOCKOPT 1994-01-07 22:16:11 +00:00
ws
0a8a197a17 Apparently noone ever tested the COMPAT_OLDSOCKOPT flag... 1994-01-06 23:00:22 +00:00
deraadt
49c0e9bead "struct ether_addr" for ethers(3) functions. 1993-12-30 04:17:40 +00:00
mycroft
95b048b53a Canonicalize all #includes. 1993-12-18 00:40:47 +00:00
hpeyerl
5097691559 >From cmaeda@cs.washington.edu; part of the multicast patches derived
from the Multicast patches for BSDI.

(I am a "big dopey bear" for having forgotten this. Thanx Havard.)
1993-12-13 15:10:40 +00:00
hpeyerl
ded89d12bc >From cmaeda@cs.washington.edu; part of the multicast patches derived
from the Multicast patches for BSDI.

Thanx to Brad Parker for making me realize i'd forgotten to commit
this patch..(color me dopey)
1993-12-12 20:43:06 +00:00
hpeyerl
f0cbd5ece5 more Multicast stuff.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.
1993-12-08 23:48:05 +00:00
hpeyerl
9589a22f73 More multicast stuff.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.
1993-12-08 23:46:31 +00:00
cgd
39bb0b1bc8 oops; fix that last... 1993-12-06 07:14:45 +00:00
cgd
443babf5ac the ugliest compatibility hack i think i've ever seen...
define COMPAT_OLDSOCKOPT to get new kernels to work with the
old args to [sg]sockopt.  this is going to go away "soon".
note that this option only has effect if MULTICAST is not defined.
1993-12-06 06:46:28 +00:00
hpeyerl
4bfc470a3c multicast patches
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.
1993-12-06 05:46:37 +00:00
hpeyerl
aa7f3b23a8 multicast support.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.
1993-12-06 04:50:19 +00:00
cgd
ec3f94cfcd fix from david greenman, davidg@freefall.cdrom.com:
fixed bug where large amounts of unidirectional UDP traffic would fill
the interface output queue and further udp packets would be fragmented
and only partially sent - keeping the output queue full and jamming the
network, but not actually getting any real work done (because you can't
send just 'part' of a udp packet - if you fragment it, you must send
the whole thing). The fix involves adding a check to make sure that the
output queue has sufficient space for all of the fragments.
1993-11-05 23:06:26 +00:00
cassidy
40c0c0a558 Add definition for reverse address resolution protocol. 1993-09-05 00:52:15 +00:00
andrew
0e6cb953ea ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.
1993-06-27 06:01:27 +00:00
cgd
e5d4c777bd bump sendspace and recvspace up to 8k each; rod says
these should be safe values...
1993-06-15 02:25:26 +00:00
deraadt
bda8918483 The latest patch was hosed. There is some program that I used which
left extra crud at the end of the file. I blame ftpd for not doing an
ftruncate().
1993-06-11 09:12:21 +00:00
deraadt
98d05222e5 patch from Yuval Yarom, sent to me by <andrew@werple.apana.org.au>
they say: When doing an implicit bind in_pcbbind will assign used ports
if the port is bound on specific interface, and not on INADDR_ANY.
Effects of the bug range from connection drops to machine hangs.
1993-06-10 05:17:53 +00:00
deraadt
6fe3b028cd patch from Yuval Yarom, sent to me by <andrew@werple.apana.org.au>
The check that the destination of a forwarded ip packet is not on
the loopback net is wrong, and will always fail.  The following patch
fixes the problem.
[allows "route add $hostname localhost" to be added to /etc/netstart to
keep things for $hostname away from the ethernet driver]
1993-06-10 05:16:46 +00:00
cgd
fe1802950b add include of select.h if necessary for protos, or delete if extraneous 1993-05-22 11:40:42 +00:00
cgd
b8e4afa7a0 add packet size check for raw IP provided by Paul Antonov <apg@apg.kiae.su>,
to fix the "traceroute foohost 2000 == panic" problem.
1993-05-21 05:27:15 +00:00
cgd
45a57e79ea more rcsid additions and file header cleanups 1993-05-20 03:49:51 +00:00
cgd
8d6c77881c make kernel select interface be one-stop shopping & clean it all up. 1993-05-18 18:18:40 +00:00
cgd
79f668c05d make ip_input recursion checking be for -DPARANOID, and make it panic 1993-05-04 05:41:18 +00:00
mycroft
235bd1db44 Add consistent multiple-inclusion protection. 1993-04-19 03:45:34 +00:00
glass
d5f887d44c this file is never compiled, nor included in 'files' because it is adapted
for the particular architecture.  However, it never would've compiled either
as it had the old '../h/foo.h' stuff in it.
1993-04-17 05:20:54 +00:00
mycroft
348f9280dc Ignore forged ICMP_UNREACH with dport==0 and sport==0. 1993-04-12 11:07:57 +00:00
glass
034707f9e5 fixed to be compliant, subservient, and to take advantage of the newly
hacked config(8)
1993-04-10 12:04:35 +00:00
cgd
e541169ce2 after 0.2.2 "stable" patches applied 1993-03-21 18:04:42 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00