thorpej
0e3a0a7f80
Once a fragmented IP packet has been reassembled, recompute the packet
...
length before passing it up the stack. From FreeBSD.
1998-11-13 03:24:22 +00:00
ws
ede30e2813
Fix a buglet when looking up an interface for multicast:
...
Zero out the routing structure before calling the route lookup code
in order to correctly match addresses.
1998-10-26 17:31:01 +00:00
matt
3ad026ac87
vax -> __vax__ (and mips to __mips__ in ultrix_misc.c)
1998-10-20 01:46:27 +00:00
kim
cd7e3136ad
Use ETHERTYPE_ATALK instead of ETHERTYPE_AT. The former seems more common.
...
Our other constants also use "ATALK".
Added many new ETHERTYPE constants to sys/net/ethertypes.h, including the
ones from libpcap and tcpdump "ethertype.h" files.
1998-10-13 02:34:31 +00:00
thorpej
14f5ac9081
Use the pool allocator for ipflow entries.
1998-10-08 01:41:45 +00:00
thorpej
974aa74abd
Use the pool allocator for ipqent structures.
1998-10-08 01:19:25 +00:00
thorpej
588ccb2d75
Fix some typos in comments, and clean up some whitespace.
1998-10-07 23:33:02 +00:00
thorpej
6cfb33b4e4
Use the pool allocator for the tcpcb's TCP/IP header template.
1998-10-07 23:20:03 +00:00
matt
bf4e491879
Fix boolean dyslexic test. Duh!
1998-10-06 00:41:13 +00:00
matt
8e8f38e0f2
Add a sysctl for newreno (default to off).
1998-10-06 00:20:44 +00:00
lukem
a1ea50ee45
* in_pcblookup_port(): deprecate INPLOOKUP_WILDCARD and flags in favour
...
of a lookup_wildcard arg; simplifies the logic a bit.
* when assigning ephemeral ports in in_pcbbind(), always call
in_pcblookup_port() with lookup_wildcard=1, so that ephemeral port
allocation on sockets with SO_REUSEADDR set won't potentially bind to a
port in use by something else (principle of least surprise).
1998-10-05 14:33:14 +00:00
matt
25054b5cf7
Adapt the NEWRENO changes from the UCSB diffs of BSDI 3.0's TCP
...
to NetBSD. Ignore the SACK & FACK stuff for now.
1998-10-04 21:33:52 +00:00
kleink
c68106edad
Use #error instead of causing a parse error.
1998-10-02 21:21:04 +00:00
drochner
5ddf423985
print reason for arplookup() failure (ala FreeBSD)
1998-10-01 11:04:24 +00:00
tls
c4730d65cf
Switch order of TNF and UCB copyrights so UCB copyright is first; this seems more appropriate since UCB wrote the original code, after all.
1998-09-30 21:52:24 +00:00
hwr
eaccb9cd8d
Start supporting IPPROTO_MOBILE (55) encapsulation. This is yet
...
another tunneling protocol used by the Mobile-IP people. See RFC 2004
for this.
1998-09-30 05:59:27 +00:00
christos
e74ca32804
SIOCGIFALIAS should not be restricted to the superuser.
1998-09-28 12:32:43 +00:00
mycroft
4a000a54e6
Fix a typo (not mine) in a comment.
1998-09-19 04:34:34 +00:00
mycroft
04ef3bf88d
If we're in LISTEN state and all of RST, SYN and ACK are clear, send a RST.
1998-09-19 04:32:51 +00:00
mycroft
31347e4671
Always send a 0 window with a RST. Suggested by Darren Reed.
1998-09-19 04:02:52 +00:00
hwr
cf70cc28c7
Typo. :(
1998-09-14 21:15:56 +00:00
hwr
517139017e
Some additions.
...
And IDPR-CMTP is 38 not 39 according to IANA.
1998-09-14 21:09:51 +00:00
hwr
366b9c4515
Add a gre tunnel pseudo network device. Gre = generic route encapsulation.
...
This device shows up like any other network interface and can be used to
tunnel L3 protocols as e.g. IP over IP.
1998-09-13 20:27:47 +00:00
christos
66dd35d72c
Fix copyright spacing and 'Van' -> 'van' for consistency.
1998-09-13 15:45:40 +00:00
tv
235fc6a6a9
egcs {brace} warning fix
1998-09-10 19:53:28 +00:00
mouse
b95116821c
Create tcp.keepidle, tcp.keepintvl, tcp.keepcnt, tcp.slowhz sysctls.
1998-09-10 10:46:03 +00:00
thorpej
9fd57e8917
Make a diagnostic printf more sensible, PR #5951 , Heiko W. Rupp.
1998-09-09 04:57:18 +00:00
thorpej
4dbfe05f1f
Use an algorithm similar to that in tcp_notify() to determine if
...
syn_cache_unreach() should remove the entry, or just continue on.
Algorithm is to only remove the entry if we've had more than one unreach
error and have retransmitted 3 or more times. This prevents the following
scenario, as noted in PR #5909 (PR from Ty Sarna, scenario from
Charles Hannum):
* Host A sends a SYN.
* Host A retransmits the SYN.
* Host B gets the first SYN and sends a SYN-ACK.
* Host B gets the second SYN and sends a SYN-ACK.
* One of the SYN-ACK bounces with an
ICMP unreachable, causing the `SYN cache' entry to be
removed with no notification.
* Host A receives the other SYN-ACK, sends an ACK, and goes to
ESTABLISHED state.
Should fix PR #5909 .
1998-09-09 01:32:27 +00:00
christos
0f024deb52
Add SIOCGIFALIAS
1998-09-06 17:52:01 +00:00
kleink
bb4f7768e4
Protect _XOPEN_SOURCE against sysctl MIB identifiers.
1998-09-05 19:03:25 +00:00
mycroft
e2cb6dad8d
Make the randomized part of the ISS 24 bits.
1998-09-04 22:34:51 +00:00
mycroft
2f501074f8
Fix a couple of bogons related to tcp_new_iss():
...
* Don't add tcp_iss_seq when creating a new ISS from TIME-WAIT state.
* Do the clock increment even when using the rnd device.
1998-09-04 22:29:54 +00:00
scottr
e3e7e1673f
Fix the NEXT_IA_WITH_SAME_ADDR macro introduced in 1.27: it was finding
...
the first in_ifaddr structure with a different internet address! Reverse
the sense of the test. Spotted by and fix from Eric Haszlakiewicz.
1998-08-14 06:57:54 +00:00
mrg
4a75265273
defopt PFIL_HOOKS.
1998-08-09 08:58:18 +00:00
thorpej
833061914a
Use the pool allocator for tcpcbs.
1998-08-02 00:36:19 +00:00
thorpej
d319e4b419
Use the pool allocator for syn_cache entries.
1998-08-02 00:35:51 +00:00
thorpej
47e9dcf841
Use the pool allocator for inpcbs.
1998-08-02 00:35:31 +00:00
tls
31d0752b99
change IN_IFADDR_HASH_SIZE to 509, which actually uses no more space than 293 due to rounding up to nearest power of two in hashinit.
1998-07-29 05:18:54 +00:00
pk
84840da908
in_pcballoc(): we can't afford to wait for memory.
1998-07-23 08:24:33 +00:00
mycroft
cca4e566a9
Implement a better fix for the `gratuitous FIN' problem, as
...
mentioned on tcp-impl but with a bit more commentary.
1998-07-21 10:46:00 +00:00
thorpej
3a9ed00799
Document that we are more conservative after doing MTU discovery than the
...
suggestion in draft-floyd-incr-init-win-03. Rather than scaling cwnd back
by the ratio of new segment size to old segment size, we perform a slow start
using the Initial Window, computed with the new segment size.
1998-07-17 23:09:58 +00:00
thorpej
0f909866c0
Clarify that we're using the Loss Window when we receive a source quench.
1998-07-17 23:02:38 +00:00
thorpej
fa20f24cd9
Add a comment wrt. a current issue w/ CWM.
1998-07-17 23:00:02 +00:00
thorpej
a3f4316cba
Clarify that we are using the Loss Window if a retransmission occurred
...
during the three-way handshake.
1998-07-17 22:58:56 +00:00
thorpej
830879a809
Comment where the Restart Window is computed, and in the non-CWM case,
...
make sure it never _increases_ cwnd.
1998-07-17 22:52:01 +00:00
thorpej
1c4ff0a086
Comment where we use the Loss Window.
1998-07-17 22:18:49 +00:00
sommerfe
69b1b4758d
Fix PR5559: if fast-forwarding, DF set, and packet too large, send ICMP error..
1998-07-17 00:35:23 +00:00
sommerfe
534520d815
Fix PR5508: ipfil cut-through forwarding causes panic
1998-07-17 00:28:00 +00:00
tls
deac3540de
Put original hash function back. It wastes a little bit of space, but is much more even -- think of the case of a web service provider, some of whose customers end up getting 'inferior service' because they're on addresses that happen to be out at the end of a hash chain. With webservers with thousands of addresses, this is a real issue. If the wasted space is a big deal, we could pick a prime number that's slightly _less_ than a power of two...
1998-07-16 06:45:09 +00:00
thorpej
389da54091
Garbage collect `imp' and `hy'. We don't have the rest of the code, and
...
it's not like anyone is ever going to be using either of them.
1998-07-15 17:39:20 +00:00
veego
97ab1bd53b
Resolve conflicts from the import.
1998-07-12 15:23:59 +00:00
mycroft
3a64270ca6
Back out the change from TCP/IP vol 2, in revision 1.7, which removed TH_FIN
...
from the output flags for CLOSING state. There is no harm in retransmitting
the FIN, and this change has unexpected side effects that break simultaneous
close behaviour.
1998-07-09 05:49:56 +00:00
sommerfe
065cac9798
Delete bogus (void) cast of m_freem (which is already a void function..)
1998-07-07 00:04:59 +00:00
jonathan
b37021c1a1
defopt NATM.
1998-07-05 22:48:05 +00:00
jonathan
9bf2ba0928
Garbage-collect ``needs-flag'' from attributes ether, fddi, arc:
...
NETHER, NFDDI, NARC are not used anywhere. Remove #include "ether.h",
which had no effect.
Removes clash with "options NATM" for native-ATM network protocol stack.
1998-07-05 22:29:51 +00:00
jonathan
011f2bda08
defopt NS, NSIP.
1998-07-05 06:49:00 +00:00
jonathan
5c0c5dd0b4
defopt ISO TPIP.
1998-07-05 04:37:35 +00:00
jonathan
f2a2327e0a
defopt EON.
1998-07-05 01:06:49 +00:00
jonathan
3751946b97
defopt INET, NETATALK.
1998-07-05 00:51:04 +00:00
jonathan
466e784ee1
defopt DDB.
1998-07-04 22:18:13 +00:00
thorpej
8cfe8959a6
Fix TCPS_HAVERCVDFIN() to actually catch all TCP states in which a FIN
...
has been received (CLOSE_WAIT, CLOSING, LAST_ACK, and TIME_WAIT).
From David Borman <dab@bsdi.com>.
1998-07-03 05:39:56 +00:00
is
0ca02c68a7
Thinko in last fix: we have to actually check each address for a copy on
...
our ifp, else we might fail for some strange configurations.
1998-07-02 14:00:39 +00:00
is
d8b8a41918
The rewrite of if_arp.c to work with the hashed interface address lists
...
(1.44) missed a test for the right interface, making some machines answer
to some bogus arp requests (like for WHO-HAS 127.0.0.1).
The quick patch in 1.46-1.47 does not work for so-called "unnumbered"
interfaces, that is, (point-to-point) interfaces that share their local
address with another (e.g., the Ethernet) interface.
We add a macro to in_var.h, to step (in the current implementation) through
the hash chain and fine more entries with the same address, and use that
in if_arp.c to find one which belongs to our interface.
1998-07-02 11:39:56 +00:00
tls
b0d2c08b6b
Fix buglet where we might respond to arp on wrong interface.
1998-06-25 20:47:48 +00:00
cgd
651b44e211
Rework the way kernel include files are installed. In the new method,
...
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
sommerfe
a90d5cd12e
Truncate mbufs to the correct length before forwarding; fixes pr5560
1998-06-10 00:47:57 +00:00
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