summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-133-20/+3
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* Forgot one line: don't try to match flags when looking for a flow.luigi2000-02-111-0/+1
| | | | Approved-by: jordan
* Re add rev 1.11 diffs to ip_fil.h Also discover that I did not undefineguido2000-02-1018-8/+29
| | | | | | | CVS_FUBAR (which no longer exists) and thus forgot to add $FreeBSD's. Add them. Approved by: jkh (is part of ipfilter upgrade)
* Forbid include of soem inet6 header files from wrong placeshin2000-02-103-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KAME put INET6 related stuff into sys/netinet6 dir, but IPv6 standard API(RFC2553) require following files to be under sys/netinet. netinet/ip6.h netinet/icmp6.h Now those header files just include each following files. netinet6/ip6.h netinet6/icmp6.h Also KAME has netinet6/in6.h for easy INET6 common defs sharing between different BSDs, but RFC2553 requires only netinet/in.h should be included from userland. So netinet/in.h also includes netinet6/in6.h inside. To keep apps portability, apps should not directly include above files from netinet6 dir. Ideally, all contents of, netinet6/ip6.h netinet6/icmp6.h netinet6/in6.h should be moved into netinet/ip6.h netinet/icmp6.h netinet/in.h but to avoid big changes in this stage, add some hack, that -Put some special macro define into those files under neitnet -Let files under netinet6 cause error if it is included from some apps, and, if the specifal macro define is not defined. (which should have been defined if files under netinet is included) -And let them print an error message which tells the correct name of the include file to be included. Also fix apps which includes invalid header files. Approved by: jkh Obtained from: KAME project
* Move definition of fw_enable from ip_fw.c to ip_input.cluigi2000-02-102-1/+1
| | | | | | | so we can compile kernels without IPFIREWALL . Reported-by: Robert Watson Approved-by: jordan
* Whoops... forgot braces in a conditionalluigi2000-02-101-6/+7
| | | | | | Revealed-by: diff with -STABLE version (the advantage of having multiple lines of development...) Approved-by: jordan
* Support the net.inet.ip.fw.enable variable, part ofluigi2000-02-102-3/+3
| | | | | | the recent ipfw modifications. Approved-by: jordan
* Support for stateful (dynamic) ipfw rules. They are veryluigi2000-02-104-65/+525
| | | | | | | | similar to ipfilter's keep-state. Look at the updated ipfw(8) manpage for details. Approved-by: jordan
* Bring over ipfilter v3_3_8 kernel sources, including merging theguido2000-02-0920-93/+108
| | | | | | | | local modifications. Also fix initializing fr_running in KLD case. Rename ipl_inited to fr_runninhg in mlfk_ipl Approved by: jkh
* Avoid kernel panic when tcp rfc1323 and rfc1644 options are enabledshin2000-02-091-4/+13
| | | | | | | | | | | | | | | | | | | | | | | at the same time. When rfc1323 and rfc1644 option are enabled by sysctl, and tcp over IPv6 is tried, kernel panic happens by the following check in tcp_output(), because now hdrlen is bigger in such case than before. /*#ifdef DIAGNOSTIC*/ if (max_linkhdr + hdrlen > MHLEN) panic("tcphdr too big"); /*#endif*/ So change the above check to compare with MCLBYTES in #ifdef INET6 case. Also, allocate a mbuf cluster for the header mbuf, in that case. Bug reported at KAME environment. Approved by: jkh Reviewed by: sumikawa Obtained from: KAME project
* Fix a (mostly harmless) scheduling-in-the-past problem withluigi2000-02-041-6/+6
| | | | | | | | dummynet (already fixed in -stable, was waiting for Jordan's approval due to the code freeze). Reported-By: Mike Tancsa Approved-By: Jordan
* The flags PKT_ALIAS_PUNCH_FW and PKT_ALIAS_PROXY_ONLY were botharchie2000-02-021-1/+1
| | | | | | | being defined as 0x40. Change the former to be 0x100. Submitted by: Erik Salander <erik@whistle.com> Approved by: jkh
* Mention what PKT_ALIAS_PROXY_ONLY does.brian2000-02-021-1/+6
| | | | Prompted by: archie
* Sorry in this just befor code freeze commit.shin2000-01-292-12/+67
| | | | | | | | | | | | | | | | | | | | | This is fix to usr.sbin/trpt and tcp_debug.[ch] I think of putting this after 4.0 but,,, -There was bug that when INET6 is defined, IPv4 socket is not traced by trpt. -I received request from a person who distribute a program which use tcp_debug interface and print performance statistics, that -leave comptibility with old program as much as possible -use same interface with other OSes So, I talked with itojun, and synced API with netbsd IPv6 extension. makeworld check, kernel build check(includes GENERIC) is done. But if there happen to any problem, please let me know and I soon backout this change.
* Mitigate the stream.c attacksimp2000-01-283-33/+65
| | | | | | | | | | | | | o Drop all broadcast and multicast source addresses in tcp_input. o Enable ICMP_BANDLIM in GENERIC. o Change default to 200/s from 100/s. This will still stop the attack, but is conservative enough to do this close to code freeze. This is not the optimal patch for the problem, but is likely the least intrusive patch that can be made for this. Obtained from: Don Lewis and Matt Dillon. Reviewed by: freebsd-security
* Avoid m_len and m_pkthdr.len inconsistency when changing m_lenshin2000-01-252-0/+4
| | | | | | | for an mbuf whose M_PKTHDR is set. PR: related to kern/15175 Reviewed by: archie
* Fix the bug that IPv4 ttl is not initialized when AF_INET6 socket is usedshin2000-01-252-16/+10
| | | | | | | | for IPv4 communication.(IPv4 mapped IPv6 addr.) Also removed IPv6 hoplimit initialization because it is alway done at tcp_output. Confirmed by: Bernd Walter <ticso@cicely5.cicely.de>
* Move the *intrq variables into net/intrq.c and unconditionallybrian2000-01-241-1/+2
| | | | | | | | | | | include this in all kernels. Declare some const *intrq_present variables that can be checked by a module prior to using *intrq to queue data. Make the if_tun module capable of processing atm, ip, ip6, ipx, natm and netatalk packets when TUNSIFHEAD is ioctl()d on. Review not required by: freebsd-hackers
* Fixed the problem that IPsec connection hangs when bigger data is sent.shin2000-01-155-0/+15
| | | | | | | -opt_ipsec.h was missing on some tcp files (sorry for basic mistake) -made buildable as above fix -also added some missing IPv4 mapped IPv6 addr consideration into ipsec4_getpolicybysock
* Added missing 'else' for 'if (isipv6)' at IPv6 length setting in tcp_respond().shin2000-01-152-2/+2
| | | | | By this bug, IPv6 reset was not sent. (I checked around same kind of bug, but no other found.)
* Removed wrong(unnecessary) & operators for pointer, in ipsec_hdrsiz_tcp().shin2000-01-152-4/+4
| | | | | | | This must be one of the reason why connections over IPsec hangs for bigger packets.(which was reported on freebsd-current@freebsd.org) But there still seems to be another bug and the problem is not yet fixed.
* add forward declarations, and small cosmetic changes.shin2000-01-151-2/+7
| | | | Submitted by: bde
* Apply patches in rev 1.2 and 1.9 that I forgotguido2000-01-141-2/+3
| | | | Pointe out by: bde
* Replace beforeinstall target with new variables used by .mk system.rgrimes2000-01-141-4/+1
| | | | Reviewed by: marcel, and make world
* Bring over ipfilter kernel sources, including merging the local modifications.guido2000-01-1315-224/+429
|
* Change struct sockaddr_storage member name, because following changeshin2000-01-131-9/+9
| | | | | | | | | | | | is very likely to become consensus as recent ietf/ipng mailing list discussion. Also recent KAME repository and other KAME patched BSDs also applied it. s/__ss_family/ss_family/ s/__ss_len/ss_len/ Makeworld is confirmed, and no application should be affected by this change yet.
* Clear rt after RTFREE. This might have sometime caused kernel panic at rtfree()shin2000-01-132-2/+8
| | | | on INET6 enabled environment.
* add a comment for some possible? IPv4 option processing.shin2000-01-132-0/+2
|
* removed incorrect ip6 length setting for IPv6 tcp reset packet.shin2000-01-132-2/+0
|
* MGETHDR() does not initialize m_pkthdr.rcvif, do it here.ru2000-01-101-0/+1
| | | | | | | This fixes page fault panic observed when diverting packets with IP options (e.g. ping -R remoteIP over natd). PR: kern/8596, kern/11199
* tcp updates to support IPv6.shin2000-01-0912-730/+2874
| | | | | | | also a small patch to sys/nfs/nfs_socket.c, as max_hdr size change. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* enable IPsec over DUMMYNET againshin2000-01-091-17/+14
| | | | | Submitted by: luigi Reviewed by: luigi
* prevent kernel panic which happens when either of IPSEC and IPDIVERTshin2000-01-081-1/+1
| | | | | | is enabled. Confirmed by: Eugene M. Kim <ab@astralblue.com>
* Add ipfw hooks for the new dummynet features.luigi2000-01-082-69/+99
| | | | | | | Support masks on TCP/UDP ports. Minor cleanup of ip_fw_chk() to avoid repeated calls to PULLUP_TO at each rule.
* Cleanup dummynet call interface so it should now work on the Alphaluigi2000-01-081-5/+7
| | | | as well. Also (probably) fix a bug introduced during the IPv6 import.
* Implement per-flow queueing. Using a single pipe config rule,luigi2000-01-082-406/+765
| | | | | | | | | | | | | | | | | | now you can dynamically create rate-limited queues for different flows using masks on dst/src IP, port and protocols. Read the ipfw(8) manpage for details and examples. Restructure the internals of the traffic shaper to use heaps, so that it manages efficiently large number of queues. Fix a bug which was present in the previous versions which could cause, under certain unfrequent conditions, to send out very large bursts of traffic. All in all, this new code is much cleaner than the previous one and should also perform better. Work supported by Akamba Corp.
* KERNEL -> _KERNELeivind2000-01-055-5/+5
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-2920-34/+34
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Make tcp_drain() actually do something. When invoked (usually as amsmith1999-12-282-0/+58
| | | | | | | | | | | desperation measure in low-memory situations), walk the tcpbs and flush the reassembly queues. This behaviour is currently controlled by the debug.do_tcpdrain sysctl (defaults to on). Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: wollman
* IPSEC support in the kernel.shin1999-12-2227-93/+1121
| | | | | | | | pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Change incorrect NULLs to 0seivind1999-12-212-6/+6
|
* The ipfilter module name wasn't exactly conventional..peter1999-12-201-1/+1
|
* M_PREPEND-related cleanups (unregisterifying struct mbuf *s).green1999-12-192-2/+2
|
* Use SEQ_* macros for comparing sequence space numbers.jlemon1999-12-142-4/+4
| | | | Reviewed by: truckman
* Always set INP_IPV4 flag for IPv4 pcb entries, because netstat needs itshin1999-12-132-5/+0
| | | | | | | | | | | to print out protocol specific pcb info. A patch submitted by guido@gvr.org, and asmodai@wxs.nl also reported the problem. Thanks and sorry for your troubles. Submitted by: guido@gvr.org Reviewed by: shin
* According to RFC 793, a reset should be honored if the sequence numberjlemon1999-12-112-14/+12
| | | | | | | is within the receive window. Follow this behavior, instead of only allowing resets at last_ack_sent. Pointed out by: jayanth@yahoo-inc.com
* Fix a '&&' that should have been a '&'.archie1999-12-101-1/+1
| | | | Submitted by: Erik Salander <erik@whistle.com>
* Fix several typos.archie1999-12-091-17/+17
| | | | Submitted by: Erik Salander <erik@whistle.com>
* Make this buildable with MROUTING defined.shin1999-12-081-1/+1
| | | | Specified by: eivind, phk
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-0714-66/+707
| | | | | | | | | | packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
OpenPOWER on IntegriCloud