summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Remove forgotten INP_UNLOCK(inp) in my previous commit.pb2002-12-221-1/+0
| | | | Reported by: hsu
* In syncache_timer(), don't attempt to lock the inpcb structurepb2002-12-211-2/+0
| | | | | | | | | associated with the syncache entry: in case tcp_close() has been called on the corresponding listening socket, the lock has been destroyed as a side effect of in_pcbdetach(), causing a panic when we attempt to lock on it. Reviewed by: hsu
* replace the special-purpose rate-limiting code with the general facilitysam2002-12-211-38/+28
| | | | | just added; this tries to maintain the same behaviour vis a vis printing the rate-limiting messages but need tweaking
* Eliminate a goto.hsu2002-12-201-39/+36
| | | | Fix some line breaks.
* Unravel a nested conditional.hsu2002-12-202-42/+24
| | | | Remove an unneeded local variable.
* Expand scope of TCP protocol lock to cover syncache data structures.hsu2002-12-201-2/+3
|
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andbmilekic2002-12-192-3/+3
| | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
* Lock up ifaddr reference counts.hsu2002-12-181-3/+5
|
* Remove unused and incorrectly maintained variable "in_interfaces"phk2002-12-171-4/+0
|
* Fix syntax in last commit.dillon2002-12-172-6/+6
|
* o Trim EOL whitespaces.maxim2002-12-152-24/+24
| | | | MFC after: 1 week
* o s/if_name[16]/if_name[IFNAMSIZ]/maxim2002-12-151-1/+1
| | | | | Reviewed by: luigi MFC after: 1 week
* o M_DONTWAIT is mbuf(9) flag: malloc(M_DONTWAIT) -> malloc(M_NOWAIT).maxim2002-12-151-7/+7
| | | | | | | The bug does not affect anything because M_NOWAIT == M_DONTWAIT. Reviewed by: luigi MFC after: 1 week
* o Fix byte order logging issue: sa.sin_port is already in host byte order.maxim2002-12-151-1/+1
| | | | | | | PR: kern/45964 Submitted by: Sascha Blank <sblank@tiscali.de> Reviewed by: luigi MFC after: 1 week
* Change tcp.inflight_min from 1024 to a production default of 6144. Createdillon2002-12-142-8/+28
| | | | | | | a sysctl for the stabilization value for the bandwidth delay product (inflight) algorithm and document it. MFC after: 3 days
* Bruce forwarded this tidbit from an analysis Van Jacobson did on andillon2002-12-142-2/+12
| | | | | | | | | | apparent ack-on-ack problem with FreeBSD. Prof. Jacobson noticed a case in our TCP stack which would acknowledge a received ack-only packet, which is not legal in TCP. Submitted by: Van Jacobson <van@packetdesign.com>, bmah@packetdesign.com (Bruce A. Mah) MFC after: 7 days
* MFS: recognize gre packets used in the WCCP protocol.sobomax2002-12-071-1/+2
| | | | Approved by: re
* Move fw_one_pass from ip_fw2.c to ip_input.c so that neitherluigi2002-11-202-1/+1
| | | | | | | | | bridge.c nor if_ethersubr.c depend on IPFIREWALL. Restore the use of fw_one_pass in if_ethersubr.c ipfw.8 will be updated with a separate commit. Approved by: re
* Back out some style changes. They are not urgent,luigi2002-11-203-76/+95
| | | | | | | I will put them back in after 5.0 is out. Requested by: sam Approved by: re
* Back out the ip_fragment() code -- it is not urgent to have it in now,luigi2002-11-202-170/+143
| | | | | | | I will put it back in in a better form after 5.0 is out. Requested by: sam, rwatson, luigi (on second thought) Approved by: re
* Add a sysctl to control the generation of source quench packets,silby2002-11-191-2/+20
| | | | | | | | and set it to 0 by default. Partially obtained from: NetBSD Suggested by: David Gilbert MFC after: 5 days
* Fix function headers and remove 'register' variable declarations.luigi2002-11-171-29/+23
|
* Move the ip_fragment code from ip_output() to a separate function,luigi2002-11-172-143/+170
| | | | | | | | | | | | | | | | so that it can be reused elsewhere (there is a number of places where it can be useful). This also trims some 200 lines from the body of ip_output(), which helps readability a bit. (This change was discussed a few weeks ago on the mailing lists, Julian agreed, silence from others. It is not a functional change, so i expect it to be ok to commit it now but i am happy to back it out if there are objections). While at it, fix some function headers and replace m_copy() with m_copypacket() where applicable. MFC after: 1 week
* Minor documentation changes and indentation fix.luigi2002-11-171-37/+26
| | | | | | | Replace m_copy() with m_copypacket() where applicable. While at it, fix some function headers and remove 'register' from variable declarations.
* Cleanup some of the comments, and reformat long lines.luigi2002-11-171-29/+27
| | | | | | | | | | | | Replace m_copy() with m_copypacket() where applicable. Replace "if (a.s_addr ...)" with "if (a.s_addr != INADDR_ANY ...)" to make it clear what the code means. While at it, fix some function headers and remove 'register' from variable declarations. MFC after: 3 days
* Massive cleanup of the ip_mroute code.luigi2002-11-156-886/+594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional changes, but: + the mrouting module now should behave the same as the compiled-in version (it did not before, some of the rsvp code was not loaded properly); + netinet/ip_mroute.c is now truly optional; + removed some redundant/unused code; + changed many instances of '0' to NULL and INADDR_ANY as appropriate; + removed several static variables to make the code more SMP-friendly; + fixed some minor bugs in the mrouting code (mostly, incorrect return values from functions). This commit is also a prerequisite to the addition of support for PIM, which i would like to put in before DP2 (it does not change any of the existing APIs, anyways). Note, in the process we found out that some device drivers fail to properly handle changes in IFF_ALLMULTI, leading to interesting behaviour when a multicast router is started. This bug is not corrected by this commit, and will be fixed with a separate commit. Detailed changes: -------------------- netinet/ip_mroute.c all the above. conf/files make ip_mroute.c optional net/route.c fix mrt_ioctl hook netinet/ip_input.c fix ip_mforward hook, move rsvp_input() here together with other rsvp code, and a couple of indentation fixes. netinet/ip_output.c fix ip_mforward and ip_mcast_src hooks netinet/ip_var.h rsvp function hooks netinet/raw_ip.c hooks for mrouting and rsvp functions, plus interface cleanup. netinet/ip_mroute.h remove an unused and optional field from a struct Most of the code is from Pavlin Radoslavov and the XORP project Reviewed by: sam MFC after: 1 week
* track changes to not strip the Ethernet header from input packetssam2002-11-141-8/+5
| | | | | Reviewed by: many Approved by: re
* track bpf changessam2002-11-141-2/+2
| | | | | Reviewed by: many Approved by: re
* Due to a memory alignment sizeof(struct ipfw_flow_id) is bigger thanmaxim2002-11-131-1/+6
| | | | | | | | | | ipfw_flow_id structure actual size and bcmp(3) may fail to compare them properly. Compare members of these structures instead. PR: kern/44078 Submitted by: Oleg Bulyzhin <oleg@rinet.ru> Reviewed by: luigi MFC after: 2 weeks
* Turn off duplicate lock checking for inp locks because udp_input()hsu2002-11-121-1/+1
| | | | intentionally locks two inp records simultaneously.
* a better solution to building FAST_IPSEC w/o INET6sam2002-11-102-8/+0
| | | | Submitted by: Jeffrey Hsu <hsu@FreeBSD.org>
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-8/+8
| | | | Verified by: md5
* temporarily disallow FAST_IPSEC and INET6 to avoid potential panics;sam2002-11-081-0/+3
| | | | will correct this before 5.0 release
* FAST_IPSEC fixups:sam2002-11-081-5/+21
| | | | | | | | | | | o fix #ifdef typo o must use "bounce functions" when dispatched from the protosw table don't know how this stuff was missed in my testing; must've committed the wrong bits Pointy hat: sam Submitted by: "Doug Ambrisko" <ambrisko@verniernetworks.com>
* fixup FAST_IPSEC build w/o INET6sam2002-11-082-2/+8
|
* correct fast ipsec logic: compare destination ip address against thesam2002-11-081-1/+1
| | | | | | contents of the SA, not the SP Submitted by: "Doug Ambrisko" <ambrisko@verniernetworks.com>
* Cast a ptrdiff_t to an int to printf.jhb2002-11-081-1/+1
|
* - Consistently update snd_wl1, snd_wl2, and rcv_up in the headerjeff2002-10-312-2/+30
| | | | | | | | | | | prediction code. Previously, 2GB worth of header predicted data could leave these variables too far out of sequence which would cause problems after receiving a packet that did not match the header prediction. Submitted by: Bill Baumann <bbaumann@isilon.com> Sponsored by: Isilon Systems, Inc. Reviewed by: hsu, pete@isilon.com, neal@isilon.com, aaronp@isilon.com
* Don't need to check if SO_OOBINLINE is defined.hsu2002-10-302-26/+16
| | | | | Don't need to protect isipv6 conditional with INET6. Fix leading indentation in 2 lines.
* Renumber IPPROTO_DIVERT out of the range of valid IP protocol numbers.fenner2002-10-293-4/+19
| | | | | | | | | | | This allows socket() to return an error when the kernel is not built with IPDIVERT, and doesn't prevent future applications from using the "borrowed" IP protocol number. The sysctl net.inet.raw.olddiverterror controls whether opening a socket with the "borrowed" IP protocol fails with an accompanying kernel printf; this code should last only a couple of releases. Approved by: re
* Lower a priority of "session drop" messages.maxim2002-10-291-1/+1
| | | | | Requested by: Eugene Grosbein <eugen@kuzbass.ru> MFC after: 3 days
* Oops, forgot to commit this file. This is part of the fixmux2002-10-241-0/+2
| | | | for ipfw2 panics on sparc64.
* Fix ipfw2 panics on 64-bit platforms.mux2002-10-241-6/+2
| | | | | | | | | | Quoting luigi: In order to make the userland code fully 64-bit clean it may be necessary to commit other changes that may or may not cause a minor change in the ABI. Reviewed by: luigi
* src and dst address were erroneously swapped in SRC_SET and DST_SETluigi2002-10-241-2/+2
| | | | commands. Use the correct one. Also affects ipfw2 in -stable.
* Fix kernel build on sparc64 in the IPDIVERT case.mux2002-10-241-1/+1
|
* Unbreak the automatic remapping of an INADDR_ANY destination addressiedowse2002-10-241-5/+4
| | | | | | | | | | | | | | | to the primary local IP address when doing a TCP connect(). The tcp_connect() code was relying on in_pcbconnect (actually in_pcbladdr) modifying the passed-in sockaddr, and I failed to notice this in the recent change that added in_pcbconnect_setup(). As a result, tcp_connect() was ending up using the unmodified sockaddr address instead of the munged version. There are two cases to handle: if in_pcbconnect_setup() succeeds, then the PCB has already been updated with the correct destination address as we pass it pointers to inp_faddr and inp_fport directly. If in_pcbconnect_setup() fails due to an existing but dead connection, then copy the destination address from the old connection.
* Kill EOL spaces.maxim2002-10-231-24/+23
| | | | | Approved by: luigi MFC after: 1 week
* Use syslog for messages about dropped sessions, do not flood a console.maxim2002-10-231-1/+1
| | | | | | Suggested by: Eugene Grosbein <eugen@kuzbass.ru> Approved by: luigi MFC after: 1 week
* fixed a kernel crash by "ifconfig stf0 inet 1.2.3.4"suz2002-10-221-5/+9
| | | | MFC after: 1 week
* Implement a new IP_SENDSRCADDR ancillary message type that permitsiedowse2002-10-212-4/+63
| | | | | | | | | | | | a server process bound to a wildcard UDP socket to select the IP address from which outgoing packets are sent on a per-datagram basis. When combined with IP_RECVDSTADDR, such a server process can guarantee to reply to an incoming request using the same source IP address as the destination IP address of the request, without having to open one socket per server IP address. Discussed on: -net Approved by: re
OpenPOWER on IntegriCloud