summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* fix another typojulian1998-06-151-2/+2
|
* Try narrow down the culprit sending undefined packet types through the loopbackjulian1998-06-141-1/+9
|
* Remove 3 occurances of __FUNCTION__julian1998-06-121-2/+2
|
* Go through the loopback code with a broom..julian1998-06-123-21/+16
| | | | | | | | | | | | | | | | Remove lots'o'hacks. looutput is now static. Other callers who want to use loopback to allow shortcutting should call the special entrypoint for this, if_simloop(), which is specifically designed for this purpose. Using looutput for this purpose was problematic, particularly with bpf and trying to keep track of whether one should be using the charateristics of the loopback interface or the interface (e.g. if_ethersubr.c) that was requesting the loopback. There was a whole class of errors due to this mis-use each of which had hacks to cover them up. Consists largly of hack removal :-)
* include opt_ipdivert.h so we get correct optionsjulian1998-06-121-1/+2
|
* Allow diverted packets from the transmit side to remember if theyjulian1998-06-121-27/+26
| | | | | had a recv interface and allow that state to be available after re-injection for further tests.
* Quieten gcc 2.8.1brian1998-06-101-2/+2
|
* Fixed pedantic semantics errors (bitfields not of type int, signed intbde1998-06-083-9/+9
| | | | | | | or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
* ip_fil.h has 9 separate declarations of iplioctl() in a disgustingbde1998-06-082-5/+8
| | | | | | | | ifdef tangle. The previous commit to ip_fil.h didn't change the one that actually applies to the current FreeBSD kernel, of course. Fixed. Fixed style bugs in previous commit to ip_fil.h.
* This commit fixes various 64bit portability problems required fordfr1998-06-076-11/+24
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Fixed pedantic semantics errors (bitfields not of type int, signed intbde1998-06-071-5/+5
| | | | or unsigned int).
* Don't call PunchFWHole() ifdef NO_FW_PUNCHbrian1998-06-063-0/+6
| | | | Pointed out by: "Steve Sims" <SimsS@IBM.Net>
* Make sure the default value of a dummy variable is 0julian1998-06-062-4/+4
| | | | so that it doesn't do anything.
* Fix wrong data type for a pointer.julian1998-06-065-16/+17
|
* clean up the changes made to ipfw over the last weeksjulian1998-06-066-101/+52
| | | | (should make the ipfw lkm work again)
* Spelling corrections.jkoshy1998-06-061-11/+11
| | | | | PR: 6868 Submitted by: Josh Gilliam <josh@quick.net>
* Reviewed by: Kirk Mckusick (mckusick@mckusick.com)julian1998-06-051-1/+6
| | | | | | Submitted by: luoqi Chen fix a type in fsck. (also add a comment that got picked up by mistake but is worth adding)
* Reverse the default sense of the IPFW/DIVERT reinjection codejulian1998-06-055-42/+42
| | | | | | | | | so that the new behaviour is now default. Solves the "infinite loop in diversion" problem when more than one diversion is active. Man page changes follow. The new code is in -stable as the NON default option.
* Let the sowwakeup macro decide when to call sowakeup rather than havepeter1998-05-312-10/+6
| | | | | | tcp "know" about it. A pending upcall would be missed, eg: used by NFS. Obtained from: NetBSD
* Fixed logic in the test to drop ICMP echo and timestamp packets whendg1998-05-261-5/+3
| | | | | | | | | net.inet.ip.icmp.bmcastecho = 0 by removing the extra check for the address being a multicast address. The test now relies on the link layer flags that indicate it was received via multicast. The previous logic was broken and replied to ICMP echo/timestamp broadcasts even when the sysctl option disallowed them. Reviewed by: wollman
* Add optional code to change the way that divert and ipfw work together.julian1998-05-255-7/+123
| | | | | | | | | | | | | | | | | | | | | | | Prior to this change, Accidental recursion protection was done by the diverted daemon feeding back the divert port number it got the packet on, as the port number on a sendto(). IPFW knew not to redivert a packet to this port (again). Processing of the ruleset started at the beginning again, skipping that divert port. The new semantic (which is how we should have done it the first time) is that the port number in the sendto() is the rule number AFTER which processing should restart, and on a recvfrom(), the port number is the rule number which caused the diversion. This is much more flexible, and also more intuitive. If the user uses the same sockaddr received when resending, processing resumes at the rule number following that that caused the diversion. The user can however select to resume rule processing at any rule. (0 is restart at the beginning) To enable the new code use option IPFW_DIVERT_RESTART This should become the default as soon as people have looked at it a bit
* Hide the interface name in the sin_zero section of the sockaddr_injulian1998-05-251-8/+50
| | | | | | | | | | | passed to the user process for incoming packets. When the sockaddr_in is passed back to the divert socket later, use thi sas the primary interface lookup and only revert to the IP address when the name fails. This solves a long standing bug with divert sockets: When two interfaces had the same address (P2P for example) the interface "assigned" to the reinjected packet was sometimes incorect. Probably we should define a "sockaddr_div" to officially hold this extended information in teh same manner as sockaddr_dl.
* Take the user's "IGNORE_DIVERT" argument from where the user put itjulian1998-05-251-5/+7
| | | | | and not from the PCB which HAPPENS to contain the same number most of the time, but not always.
* Take IP options into account when calculating the allowable lengthfenner1998-05-241-4/+13
| | | | | | | of the TCP payload. See RFC1122 section 4.2.2.6 . This allows Path MTU discovery to be used along with IP options. PR: problem discovered by Kevin Lahey <kml@nas.nasa.gov>
* The ipt_ptr field is 1-based (see TCP/IP Illustrated, Vol. 1, pp. 91-95),dg1998-05-241-3/+3
| | | | | | | | | | so it must be adjusted (minus 1) before using it to do the length check. I'm not sure who to give the credit to, but the bug was reported by Jennifer Dawn Myers <jdm@enteract.com>, who also supplied a patch. It was also fixed in OpenBSD previously by andreas.gunnarsson@emw.ericsson.se, and of course I did the homework to verify that the fix was correct per the specification. PR: 6738
* Primary verison of NetBIOS over TCP/IP. Now you can connect Windowsamurai1998-05-245-4/+622
| | | | | | | DOMAIN as DOMAIN user through NAT function. See also RFC1002 for futher detail of SMB structure. Submitted by: Atsushi Murai <amurai@spec.co.jp>
* Get more details on the "arpresolve: can't allocate llinfo" bogon.phk1998-05-231-3/+4
| | | | | | PR: 2570 Reviewed by: phk Submitted by: fenner
* Fix a typo-bug in ipflow_reap that could cause a NULL pointerjdp1998-05-191-2/+2
| | | | dereference. I have also sent this fix to Matt Thomas.
* Move (private) struct ipflow out of ip_var.h, to reduce dependenciespb1998-05-193-16/+61
| | | | | (for ipfw for example) on internal implementation details. Add $Id$ where missing.
* Moved #define of IPFLOW_HASHBITS to ip_flow.c where I think it belongs.dg1998-05-192-2/+2
|
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viadg1998-05-196-8/+368
| | | | | | | | | | | | NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and minorly tweaked by me. This is a standard part of FreeBSD, but must be enabled with: "sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must also be enabled. This should probably be modified to use the zone allocator for speed and space efficiency. The current algorithm also appears to lose if the number of active paths exceeds IPFLOW_MAX (256), in which case it wastes lots of time trying to figure out which cache entry to drop.
* Grumble...It seems I'm suffering from some mental disease. Do it correct now.guido1998-05-182-4/+4
|
* Add some parenthesis for clarity and fix a bugguido1998-05-182-4/+4
| | | | Pointed out by: Garrett Wollmand
* Convert socket structures to be type-stable and add a version number.wollman1998-05-159-64/+411
| | | | | | | | | | | | | | | | | | | Define a parameter which indicates the maximum number of sockets in a system, and use this to size the zone allocators used for sockets and for certain PCBs. Convert PF_LOCAL PCB structures to be type-stable and add a version number. Define an external format for infomation about socket structures and use it in several places. Define a mechanism to get all PF_LOCAL and PF_INET PCB lists through sysctl(3) without blocking network interrupts for an unreasonable length of time. This probably still has some bugs and/or race conditions, but it seems to work well enough on my machines. It is now possible for `netstat' to get almost all of its information via the sysctl(3) interface rather than reading kmem (changes to follow).
* Treat all internet addresses as u_int32_t.jb1998-05-101-15/+15
|
* In the words of the submitter:msmith1998-05-071-0/+7
| | | | | | | | | | | | | | | | | | | --------- Make callers of namei() responsible for releasing references or locks instead of having the underlying filesystems do it. This eliminates redundancy in all terminal filesystems and makes it possible for stacked transport layers such as umapfs or nullfs to operate correctly. Quality testing was done with testvn, and lat_fs from the lmbench suite. Some NFS client testing courtesy of Patrik Kudo. vop_mknod and vop_symlink still release the returned vpp. vop_rename still releases 4 vnode arguments before it returns. These remaining cases will be corrected in the next set of patches. --------- Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Refuse accellerated opens on listening sockets that have not setguido1998-05-042-4/+8
| | | | | | | | the TCP_NOPUSH socket option. This disables TAO for those services that do not know about T/TCP. Reviewed by: Garrett Wollman Submitted by: Peter Wemm
* At the request of Garrett, changed sysctl:dg1998-04-242-4/+4
| | | | net.inet.tcp.delack_enabled -> net.inet.tcp.delayed_ack
* Ensure that TCP_REXMTVAL doesn't return a value less than t_rttmin. Thisdg1998-04-242-14/+9
| | | | | | | | | | | is believed to have been broken with the Brakmo/Peterson srtt calculation changes. The result of this bug is that TCP connections could time out extremely quickly (in 12 seconds). Also backed out jdp's partial fix for this problem in rev 1.17 of tcp_timer.c as it is obsoleted by this commit. Bug was pointed out by Kevin Lehey <kml@roller.nas.nasa.gov>. PR: 6068
* Remove the artificial limit on the size of the ipfw filter structure.julian1998-04-211-13/+40
| | | | This allows the addition of extra fields if we need them (I have plans).
* o Support a compile-time -DNO_FW_PUNCH for portabilitybrian1998-04-194-4/+23
| | | | | | (and those of us that don't want the functionality). o Don't assume sizeof(long) == 4. Ok'd by: Charles Mott <cmott@srv.net>
* According to:phk1998-04-192-6/+17
| | | | | | | | | | | | | | | | | | | ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers port numbers are divided into three ranges: 0 - 1023 Well Known Ports 1024 - 49151 Registered Ports 49152 - 65535 Dynamic and/or Private Ports This patch changes the "local port range" from 40000-44999 to the range shown above (plus fix the comment in in_pcb.c). WARNING: This may have an impact on firewall configurations! PR: 5402 Reviewed by: phk Submitted by: Stephen J. Roznowski <sjr@home.net>
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-173-6/+6
|
* Support compiling with `gcc -ansi'.bde1998-04-151-4/+8
|
* Wrong header length used for certain reassembled IP packets.phk1998-04-131-1/+3
| | | | | | PR: 6177 Reviewed by: phk, wollman Submitted by: Eric Sprinkle <eric@ennovatenetworks.com>
* Use read_random()phk1998-04-061-2/+7
|
* Remove the last traces of TUBA.phk1998-04-065-32/+5
| | | | Inspired by: PR kern/3317
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-304-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-1/+3
| | | | used.
* Fixed style bugs (mostly) in previous commit.bde1998-03-287-25/+33
|
OpenPOWER on IntegriCloud