Commit Graph

419 Commits

Author SHA1 Message Date
thorpej b22946827d Add a comment explaining why we do _not_ ACK data that might accompany
a SYN (avoidance of a DoS attack).
1998-06-02 18:33:02 +00:00
thorpej c296923d2f Loss window MUST be one segment, per draft-floyd-incr-init-win-03. 1998-06-02 17:22:26 +00:00
thorpej edc01ec330 In addition to the IP flow hash table, put the flows on a list. The table
is used for fast lookup, the list for traversal of all flows.  Also, use
PRT timers.
1998-06-02 15:48:03 +00:00
thorpej 837a8317b5 Eek, we were wasting almost half of the in_ifaddr hash space by modulo'ing
with IN_IFADDR_HASH_SIZE.  Instead, AND with the hash mask computed by
hashinit().
1998-06-01 00:50:07 +00:00
thorpej 08b5a4ecb8 Protect the ipflow_reap() call with splsoftnet. 1998-06-01 00:39:37 +00:00
cgd dd8ed56342 Another demonstration that when you're converting variables from 'long's
to fixed 32-bit integers, you have to exercise care.
1998-05-31 19:39:13 +00:00
veego 6250554a65 Fix compiler warnings: Add missing ()'s. 1998-05-29 20:28:17 +00:00
veego 630030601c Fix some compiler warnings: Missing prototype and ()'s. 1998-05-29 20:27:18 +00:00
veego a4c89e3e2e Resolve conflicts from the import of IPFilter 3.2.7. 1998-05-29 20:24:36 +00:00
matt c0a1601f95 Change arp so its console log messages print out IP addresses in
dotted quad format instead of hex.
1998-05-29 15:34:24 +00:00
thorpej f555f6d93f Fix OBOB in IP timestamp option processing, as noted in FreeBSD PR 6738,
from Jennifer Dawn Meyers <jdm@enteract.com>.
1998-05-24 20:14:53 +00:00
matt f070ddb8ed Move the ppcb pointer towards the front of the structure so that it and the
pcb chain pointers can possibly be in the same cache line.
1998-05-18 17:10:37 +00:00
matt 1b2b1d801b Fix two bugs. 1998-05-18 17:08:56 +00:00
veego 82423e3d01 Resolve conflicts 1998-05-17 16:50:15 +00:00
kml dd5ed34b88 Changed initialization of peermss to ensure that it didn't have
the TCP and IP options lengths removed from it -- the IP options can
change over the course of a connection...
1998-05-12 21:45:51 +00:00
thorpej c5fc2e9acd Back out previous. This problem was already fixed in a different way. 1998-05-11 23:13:40 +00:00
matt 53b04a8d3c Let usr.sbin/tcpdump build again. 1998-05-11 23:09:35 +00:00
thorpej 49573284f5 Make sure a timer is marked "disarmed" once it has expired. 1998-05-11 20:52:18 +00:00
thorpej 5596fe2614 Nuke TUBA per my note to tech-net; there's no reason to keep it around. 1998-05-11 19:57:23 +00:00
kml 1216b9a560 Change comments on tcp_mss_to_advertise to match actual arguments 1998-05-07 22:30:23 +00:00
thorpej ce3d776874 Rework the syn cache code somewhat:
- Don't use home-grown queue manipulation.  Use <sys/queue.h> instead.  The
  data structures are a little larger, but we are otherwise wasting the
  memory chunk anyway (we're already a 64-byte malloc bucket).
- Fix a bug in the cache-is-full case: if the oldest element removed from
  the first non-empty bucket was the only element in the bucket, the
  bucket wouldn't be removed from the bucket cache, causing queue corruption
  later.
- Optimize the syn cache timers by using PRT timers rather than home-grown
  decrement-and-propagate timers.

This code is now a fair bit smaller, and significantly easier to read
and understand.
1998-05-07 01:37:27 +00:00
thorpej dc49b0342e Define all TCP timers in terms of PRT timers. 1998-05-07 01:30:46 +00:00
thorpej 34e34c985a Use the monotonically increasing slow timer timestamp provided by
the protocol dispatch layer for TCP timers.  This saves having to
modify a potentially large number of timer values (which were shorts,
and expanded to ... a lot of code on the Alpha).
1998-05-06 01:24:38 +00:00
thorpej 1ffa60ac01 Use macros from tcp_timer.h to manipulate TCP timers, so that their
implementation can be changed easily.
1998-05-06 01:21:20 +00:00
matt 36eac04cc0 Default IP flow to being enabled. Add a sysctl to control the maximum
number of flows (net.inet.ip.maxflows).  If set to 0, will disable fast
path forwarding.
1998-05-04 19:24:53 +00:00
thorpej 447384d6b8 - kern/5380 (Dennis Ferguson): fix incremental IP header checksum.
- kern/5381 (Dennis Ferguson): check IP header checksum in fast forward
  code.
- In ipflow_slowtimo(), if no IP flows are in use, don't bother checking
  all of the hash buckets.
1998-05-04 05:46:04 +00:00
thorpej e44c4fb7d3 Once again, move a declaration for the benefit of TUBA (grumble). 1998-05-03 19:54:56 +00:00
thorpej b9fc258065 Oops, move a variable declaration so TUBA won't lose. 1998-05-02 04:23:05 +00:00
thorpej b71e4ddf4c Reintroduce the immediate ACK-on-PUSH behavior removed in revision 1.47,
but make the decision to do this dependent on the sysctl variable
net.inet.tcp.ack_on_push, which is disabled by default.
1998-05-02 04:21:58 +00:00
thorpej e1934b4c36 Correct a comment related to Congestion Window Monitoring. 1998-05-02 01:00:24 +00:00
thorpej be12c489b4 Garbage-collect. 1998-05-01 18:31:12 +00:00
thorpej 77af553e79 If packets are passed through IP Filter at all, don't allow fast-forward
flow entries to be created for them.

Eventually, IP Filter should be extended to allow IP src/dst pairs to
be specified as "fast forward OK".
1998-05-01 03:28:14 +00:00
thorpej 4452bc9a21 Allow packet filters to prevent a packet from creating a fast-forwarding
flow, by setting the "can fast forward" flag in the packet header, and
giving a chance for filters to clear the flag.  If the flag is still
set after the filters have given it a chance, the packet will be used
to create a fast-forward flow entry.
1998-05-01 03:23:24 +00:00
kml e173e7a084 Remove bogus black hole discovery code 1998-05-01 01:15:55 +00:00
thorpej ce40806e29 In the CWM code, don't use the Floyd initial window computation as
the burst size allowed, but rather a fixed number of packets, as
described in the Internet Draft.  Default allowed burst is 4 packets,
per the Draft.

Make the use of CWM and the allowed burst size tunable via sysctl.
1998-04-30 18:27:20 +00:00
thorpej e81920fa23 Make tcp_compat_42 a sysctl option. 1998-04-30 17:55:27 +00:00
thorpej 7e05be912b Need <net/route.h> 1998-04-30 17:47:26 +00:00
matt d4d709f7d0 Add support for "fast" forwarding. Add hooks in if_ethersubr.c and
if_fddisubr.c to fastpath IP forwarding.  If ip_forward successfully
forwards a packet, it will create a cache (ipflow) entry.  ether_input
and fddi_input will first call ipflow_fastforward with the received
packet and if the packet passes enough tests, it will be forwarded (the
ttl is decremented and the cksum is adjusted incrementally).
1998-04-29 21:37:52 +00:00
matt 37d70e3b46 defopt GATEWAY 1998-04-29 20:45:30 +00:00
matt 334f006538 New TCP reassembly code. The new code reduces the memory needed by
out-of-order packets and builds the infrastructure needed for sending
SACK blocks (to be added shortly).
1998-04-29 20:43:29 +00:00
thorpej 00d50da592 Fix some whitespace. 1998-04-29 05:44:47 +00:00
thorpej 13f972a4d6 Make use of the work-arounds for ancient broken TCP peers run-time
conditional (tcp_compat_42).  The kernel config option TCP_COMPAT_42
will still enable this by default, or disable this by default if the
option is not included (i.e. current behavior).  This will be made a
sysctl soon.
1998-04-29 05:16:46 +00:00
kml eadcaa201c change path MTU timeout value to match RFC 1191 1998-04-29 03:45:52 +00:00
kml 1579dcec47 Add support for deletion of routes added by path MTU discovery;
uses new generic route timeout code.  Add sysctl for timeout period.
1998-04-29 03:44:11 +00:00
thorpej 100bfaf39a Change RFC1323 timestamp update rule per Section 3.4 of RFC1323.bis. Old
rule was to update the timestamp if the sequence numbers are in range.  New
rule adds a check that the timestamp is advancing, thus preventing our notion
of the most recent timestamp from incorrectly moving backwards.
1998-04-29 00:43:46 +00:00
thorpej df750b93da Log the peer's IP address on received window scale factors larger than
TCP_MAX_WINSHIFT (14), as recommended in Section 2.3 of RFC1323.
1998-04-28 21:52:16 +00:00
matt 5b43c678b7 Only transmit fragments if the send queue of interface can actually hold
all of the fragments.  Use the mtu of route in preference of the MTU of the
interface when doing fragmentation decisions.  (ie. Fragment to the path
mtu if it is available).
1998-04-28 15:26:00 +00:00
kml fcf0227962 Fix to ensure that the correct MSS is advertised for loopback
TCP connections by using the MTU of the interface.  Also added
a knob, mss_ifmtu, to force all connections to use the MTU of
the interface to calculate the advertised MSS.
1998-04-13 21:18:19 +00:00
thorpej 47b4697587 Remember any source routes that may have accompanied a SYN. 1998-04-07 05:09:19 +00:00
thorpej 04d3f25df8 Now that we have a flags word in the syn cache entry, use a flag to indicate
"peer will do timestamps" rather than a bitfield, and give the now-unsed
bit to the hash, making it now 32 bits.
1998-04-03 08:02:45 +00:00