summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Add INP_INHASHLIST flag for inpcb->inp_flags to indicate whetherrwatson2009-03-112-4/+11
| | | | | | | | | | or not the inpcb is currenty on various hash lookup lists, rather than using (lport != 0) to detect this. This means that the full 4-tuple of a connection can be retained after close, which should lead to more sensible netstat output in the window between TCP close and socket close. MFC after: 2 weeks
* Remove unused v6 macro aliases for inpcb fields:rwatson2009-03-101-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | in6p_ip6_nxt in6p_vflag in6p_flags in6p_socket in6p_lport in6p_fport in6p_ppcb Remove unused v6 macro aliases for inpcb flags: IN6P_HIGHPORT IN6P_LOWPORT IN6P_ANONPORT IN6P_RECVIF IN6P_MTUDISC IN6P_FAITH IN6P_CONTROLOPTS References to in6p_lport and in6_fport in sockstat are also replaced with normal inp_lport and inp_fport references. MFC after: 3 days Reviewed by: bz
* Don't print inm_print() chatter when KTR_IGMPV3 is not enabledbms2009-03-101-0/+3
| | | | | | in the KTR_COMPILE mask. Found by: gnn
* Remove now-unused INP_UNMAPPABLEOPTS.rwatson2009-03-101-2/+0
| | | | | MFC after: 3 days Discussed with: bz
* Fix uninitialized use of ifp for ii.bms2009-03-091-1/+3
| | | | Found by: Peter Holm
* Merge IGMPv3 and Source-Specific Multicast (SSM) to the FreeBSDbms2009-03-0913-1274/+5694
| | | | | | | | | | | IPv4 stack. Diffs are minimized against p4. PCS has been used for some protocol verification, more widespread testing of recorded sources in Group-and-Source queries is needed. sizeof(struct igmpstat) has changed. __FreeBSD_version is bumped to 800070.
* On architectures with strict alignment requirements compensatemarius2009-03-071-4/+18
| | | | | | | | the misalignment of the IP header that prepending the EtherIP header might have caused. PR: 131921 MFC after: 1 week
* Fixes for window probes:rrs2009-03-062-50/+70
| | | | | | 1) WP should never be marked unless flight size is 0 2) When recovering from wp if the peer ack's it we don't mark for retran 3) When recovering, we must assure a timer is still running.
* - PR-SCTP bug, where the CUM-ACK was not being updatedrrs2009-03-043-16/+27
| | | | | | | | | | into the advance_peer_ack point so we would incorrectly send a wrong value in the FWD-TSN - PR-SCTP bug, where an PR packet is used for a window probe which could incorrectly get the packet moved back into the send_queue, which will cause major issues and should not happen. - Fix a trace to use the proper macro.
* In ip_output(), do not acquire the IN_MULTI_LOCK(),bms2009-03-041-17/+14
| | | | | | | | | | | | | | | | | | | | and do not attempt to perform a group lookup. This is a socket layer lock, and the bottom half of IP really has no business taking it. Use the value of the in_mcast_loop sysctl to determine if we should loop back by default, in the absence of any multicast socket options. Because the check on group membership is now deferred to the input path, an m_copym() is now required. This should increase multicast send performance where the source has not requested loopback, although this has not been benchmarked or measured. It is also a necessary change for IN_MULTI_LOCK to become non-recursive, which is required in order to implement IGMPv3 in a thread-safe way.
* Add sysctl net.inet.ip.mcast.loop. This controls whether or notbms2009-03-041-1/+8
| | | | | | IPv4 multicast sends are looped back to senders by default on a stack-wide basis, rather than relying on the socket option. Note that the sysctl only applies to newly created multicast sockets.
* Merge header file definitions used by the new IGMPv3 implementation.bms2009-03-041-38/+68
| | | | | This is a partial merge. Compatibility defines are retained for the existing IGMPv2 implementation.
* Add various defines/macros required by IGMPv3:bms2009-03-041-1/+10
| | | | | | | | * MCAST_UNDEFINED state. * in_allhosts() macro (group is 224.0.0.1). This uses a const endian comparison. * IP_MAX_GROUP_SRC_FILTER, IP_MAX_SOCK_SRC_FILTER default resource limits.
* Add function ip_checkrouteralert(), which will be usedbms2009-03-042-0/+62
| | | | | by IGMPv3 to check for the IPv4 Router Alert [RFC2113] option in a pulled-up IP mbuf chain.
* Start removing IPv6 Type 0 Routing header code.bz2009-03-031-1/+1
| | | | | | | | | | RH0 was deprecated by RFC 5095. While most of the code had been disabled by #if 0 already, leave a bit of infrastructure for possible RH2 code and a log message under BURN_BRIDGES in case a user still tries to send RH0 packets. Reviewed by: gnn (a bit back, earlier version)
* curr_time is a 64 bit variable so SYSCTL_LONG is not appropriateluigi2009-03-021-0/+2
| | | | | | | | as a handler. The variable was exported only for debugging, but there is little reason to do it now that the timekeeping is supported by various other variables. For the time being just comment out the sysctl, but I think this should go away.
* fw_debug has been unused for ages, so remove it from the listluigi2009-03-022-5/+1
| | | | | | | | | | of sysctl_variables. I would also remove it from the VNET record but I am unsure if there is any ABI issue -- so for the time being just mark it as unused in ip_fw.h, and then we will collect the garbage at some appropriate time in the future. MFC after: 3 days
* Add size-guards evaluated at compile-time to the main struct vnet_*bz2009-03-011-0/+3
| | | | | | | | | | which are not in a module of their own like gif. Single kernel compiles and universe will fail if the size of the struct changes. Th expected values are given in sys/vimage.h. See the comments where how to handle this. Requested by: peter
* Remove unreachable code for generating RST segments from tcp_twcheck();rwatson2009-02-281-45/+0
| | | | | | | this code became stale when T/TCP support was removed. Discussed with: bz, sam MFC after: 1 month
* Fix the add stream feature of strm-reset to really work:rrs2009-02-275-49/+133
| | | | | | | | | | | - Fix the copy, we can't do a blind copy but must transfer the data from the old to the new. - Fix the ACK processing so we properly stop retransmitting the thing. - Fix it so if we get a retran we will properly reply with the saved response without doing anything. MFC after: 1 month
* For all files including net/vnet.h directly include opt_route.h andbz2009-02-2710-0/+12
| | | | | | | | | | | | | | net/route.h. Remove the hidden include of opt_route.h and net/route.h from net/vnet.h. We need to make sure that both opt_route.h and net/route.h are included before net/vnet.h because of the way MRT figures out the number of FIBs from the kernel option. If we do not, we end up with the default number of 1 when including net/vnet.h and array sizes are wrong. This does not change the list of files which depend on opt_route.h but we can identify them now more easily.
* Change the functions to ANSI in those cases where it breaks promotionrdivacky2009-02-241-4/+1
| | | | | | | | to int rule. See ISO C Standard: SS6.7.5.3:15. Approved by: kib (mentor) Reviewed by: warner Tested by: silence on -current
* In tcp_usr_shutdown() and tcp_usr_send(), I missed converting NULLrwatson2009-02-241-2/+3
| | | | | | | | | | | checks for the tcpcb, previously used to detect complete disconnection, with INP_DROPPED checks. Correct that, preventing shutdown() from improperly generating a TCP segment with destination IP and port of 0.0.0.0:0. PR: kern/132050 Reported by: david gueluy <david.gueluy at netasq.com> MFC after: 3 weeks
* In in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKEDrwatson2009-02-231-1/+4
| | | | | | | | | | to in_rtrequest(); the radix head lock is already acquired before rnh_walktree is called in in_rtqtimo_one(). This avoids a recursive acquisition that is no longer permitted in 8.x due to use of an rwlock for the radix head lock. Reported by: dikshie <dikshie at gmail.com> MFC after: 3 days
* Add the add-stream capability. Still needs morerrs2009-02-2010-36/+281
| | | | | | testing.. MFC after: 1 month
* Fix a bug. The sending was being restricted improperly byrrs2009-02-201-2/+2
| | | | | | | | the max_burst. It should only be gated by cwnd in the lower level send. Obtained from: Michael Tuexen MFC after: 1 week.
* correct some #includeluigi2009-02-162-3/+2
|
* remove dependency on eventhandler.h, we only need a forward declarationluigi2009-02-161-1/+2
|
* remove dependency on net/if.h of this headerluigi2009-02-161-0/+1
|
* use a const format string in the log message so we can check theluigi2009-02-161-6/+11
| | | | arguments (if/when we enable those checks)
* remove unnecessary #include from vnet.h and vinet.hluigi2009-02-151-3/+0
| | | | Approved by: Marko Zec
* This commit fixes the issue with alias_sctp.c. Norrs2009-02-143-693/+58
| | | | | | | | | | | | | | longer do we require SCTP to be in the kernel for the lib to be able to handle SCTP. We do this by moving the CRC32c checksum into libkern/crc32.c and then adjusting all routines to use the common methods. Note that this will improve the performance of iSCSI since they were using the old single 256 bit table lookup versus the slicing 8 algorithm (which gives a 4x speed up in CRC32c calculation :-D) Reviewed by:rwatson, gnn, scottl, paolo MFC after: 4 week? (assuming we MFC the alias_sctp changes)
* Have the jail code use the error returned to pass not constantrrs2009-02-132-27/+23
| | | | | errors. Obtained from: jamie@freebsd.org
* remove unnecessary #include, and document some of the othersluigi2009-02-132-14/+10
|
* Use uint32_t instead of n_long and n_time, and uint16_t instead of n_short.luigi2009-02-137-22/+29
| | | | | | | | | Add a note next to fields in network format. The n_* types are not enough for compiler checks on endianness, and their use often requires an otherwise unnecessary #include <netinet/in_systm.h> The typedef in in_systm.h are still there.
* Move the new rwnd field down to the very endrrs2009-02-132-3/+3
| | | | | | of the xsctp structure. This is where all new fields belong (not that we will be ABI compatiable with 7.x anyway.. sigh).
* Add padding to then end of the xsctp_xxx structures torrs2009-02-091-0/+4
| | | | allow future changes to be able to maintain ABI compatibility
* Fix minor spacing problem found by s9indent from lastrrs2009-02-091-2/+4
| | | | commit.
* Fix INET only build breakage with SCTP - pointy hat to me :-)rrs2009-02-091-0/+2
|
* Try to remove/assimilate as much of formerly IPv4/6 specificbz2009-02-083-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (duplicate) code in sys/netipsec/ipsec.c and fold it into common, INET/6 independent functions. The file local functions ipsec4_setspidx_inpcb() and ipsec6_setspidx_inpcb() were 1:1 identical after the change in r186528. Rename to ipsec_setspidx_inpcb() and remove the duplicate. Public functions ipsec[46]_get_policy() were 1:1 identical. Remove one copy and merge in the factored out code from ipsec_get_policy() into the other. The public function left is now called ipsec_get_policy() and callers were adapted. Public functions ipsec[46]_set_policy() were 1:1 identical. Rename file local ipsec_set_policy() function to ipsec_set_policy_internal(). Remove one copy of the public functions, rename the other to ipsec_set_policy() and adapt callers. Public functions ipsec[46]_hdrsiz() were logically identical (ignoring one questionable assert in the v6 version). Rename the file local ipsec_hdrsiz() to ipsec_hdrsiz_internal(), the public function to ipsec_hdrsiz(), remove the duplicate copy and adapt the callers. The v6 version had been unused anyway. Cleanup comments. Public functions ipsec[46]_in_reject() were logically identical apart from statistics. Move the common code into a file local ipsec46_in_reject() leaving vimage+statistics in small AF specific wrapper functions. Note: unfortunately we already have a public ipsec_in_reject(). Reviewed by: sam Discussed with: rwatson (renaming to *_internal) MFC after: 26 days X-MFC: keep wrapper functions for public symbols?
* Silent LINT: add 2 stubs (update_crc32 and sctp_finalize_crc32) to fix ↵piso2009-02-081-0/+11
| | | | LIBALIAS + SCTP_NO_CSUM case.
* Add SCTP NAT support.piso2009-02-078-6/+2993
|\ | | | | | | Submitted by: CAIA (http://caia.swin.edu.au)
| * Import sctp nat support in ipfw obtained from CAIA - http://caia.swin.edu.au.piso2008-12-287-8/+3112
| |
* | Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and ofjamie2009-02-051-11/+4
| | | | | | | | | | | | prison_local_ip6 in in6_pcbbind. Approved by: bz (mentor)
* | Standardize the various prison_foo_ip[46] functions and prison_if tojamie2009-02-055-67/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor)
* | LOR fix - Lock only when calling the actual code thatrrs2009-02-031-2/+4
| | | | | | | | | | | | | | is messing with the UDP tunnel. This means that if two users actually tried to change the tunnel port at the same time interesting things COULD result, but its probably very unlikely to happen :-)
* | - Cleanup checksum code.rrs2009-02-0314-751/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Prepare for CRC offloading, add MIB counters (RS/MT). - Bugfix: Disable CRC computation for IPv6 addresses with local scope (MT). - Bugfix: Handle close() with SO_LINGER correctly when notifications are generated during the close() call(MT). - Bugfix: Generate DRY event when sender is dry during subscription. Only for 1-to-1 style sockets (RS/MT) - Bugfix: Put vtags for the correct amount of time into time-wait (MT). - Bugfix: Clear vtag entries correctly on expiration (MT). - Bugfix: shutdown() indicates ENOTCONN when called for unconnected 1-to-1 style sockets (MT). - Bugfix: In sctp Auth code (PL). - Add support for devices that support SCTP csum offload (igb). - Add missing sctp_associd to mib sysctl xsctp_tcb structure (RS) Obtained from: With help from Peter Lei and Michael Tuexen
* | Adds support for SCTP checksum offload. This meansrrs2009-02-033-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | we, like TCP and UDP, move the checksum calculation into the IP routines when there is no hardware support we call into the normal SCTP checksum routine. The next round of SCTP updates will use this functionality. Of course the IGB driver needs a few updates to support the new intel controller set that actually does SCTP csum offload too. Reviewed by: gnn, rwatson, kmacy
* | initialize a couple of variables, gcc 4.2.4-4 (linux) reportsluigi2009-01-281-1/+2
| | | | | | | | some possible uninitialized uses and the warning does make sense.
* | For some reason (probably dating ages ago) an #ifdef SYSCTL_NODE / #endifluigi2009-01-281-2/+5
| | | | | | | | | | | | | | | | | | | | section included a lot of stuff that did not belong there. So split the block in multiple components each around the relevant stuff. This said, I wonder if building a kernel where SYSCTL_NODE is not defined is supported at all. Submitted by: Marta Carbone
OpenPOWER on IntegriCloud