summaryrefslogtreecommitdiff
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge tcp_fsm.h:1.17 from HEAD to RELENG_5:Robert Watson2004-12-251-1/+1
| | | | | | | | | | | | | | | | date: 2004/11/21 14:38:04; author: rwatson; state: Exp; lines: +1 -1 s/send/sent/ in comment describing TCPS_SYN_RECEIVED. Notes: svn path=/stable/5/; revision=139311
| * Merge in_pcb.c:1.155 from HEAD to RELENG_5:Robert Watson2004-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | date: 2004/09/29 04:01:13; author: rwatson; state: Exp; lines: +1 -1 Assign so_pcb to NULL rather than 0 as it's a pointer. Spotted by: dwhite Notes: svn path=/stable/5/; revision=139309
| * Merge if_ether.c:1.130 from HEAD to RELENG_5:Robert Watson2004-12-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | date: 2004/10/12 17:10:40; author: rwatson; state: Exp; lines: +7 -1 Modify the thrilling "%D is using my IP address %s!" message so that it isn't printed if the IP address in question is '0.0.0.0', which is used by nodes performing DHCP lookup, and so constitute a false positive as a report of misconfiguration. Notes: svn path=/stable/5/; revision=139308
| * Merge tcp_timer.c:1.70 from HEAD to RELENG_5:Robert Watson2004-12-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | date: 2004/12/05 22:47:29; author: rwatson; state: Exp; lines: +1 -0 Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in the tcptw undergo non-atomic read-modify-writes. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139307
| * Merge tcp_subr.c:1.212 from HEAD to RELENG_5:Robert Watson2004-12-251-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/12/05 22:27:53; author: rwatson; state: Exp; lines: +12 -1 Assert inpcb lock in: tcpip_fillheaders() tcp_discardcb() tcp_close() tcp_notify() tcp_new_isn() tcp_xmit_bandwidth_limit() Fix a locking comment in tcp_twstart(): the pcbinfo will be locked (and is asserted). MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139306
| * Merge tcp_input.c:1.258 from HEAD to RELENG_5, with the exception ofRobert Watson2004-12-251-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one block obsoleted by the decision not to hold the TCP pcbinfo lock over a jump to check_delack: date: 2004/11/23 23:41:20; author: rwatson; state: Exp; lines: +19 -12 In tcp_reass(), assert the inpcb lock on the passed tcpcb, since the contents of the tcpcb are read and modified in volume. In tcp_input(), replace th comparison with 0 with a comparison with NULL. At the 'findpcb', 'dropafterack', and 'dropwithreset' labels in tcp_input(), assert 'headlocked'. Try to improve consistency between various assertions regarding headlocked to be more informative. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139305
| * Merge tcp_input.c:1.257, tcp_subr.c:1.211, tcp_timer.c:1.69 from HEADRobert Watson2004-12-253-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to RELENG_5: date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +4 -0 date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +2 -0 date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +9 -0 tcp_timewait() performs multiple non-atomic reads on the tcptw structure, so assert the inpcb lock associated with the tcptw. Also assert the tcbinfo lock, as tcp_timewait() may call tcp_twclose() or tcp_2msl_rest(), which require it. Since tcp_timewait() is already called with that lock from tcp_input(), this doesn't change current locking, merely documents reasons for it. In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest() is called, which requires that lock. In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop() is called, which requires that lock. Document the locking strategy for the time wait queues in tcp_timer.c, which consists of protecting the time wait queues in the same manner as the tcbinfo structure (using the tcbinfo lock). In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait queues are modified. In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait queues may be modified. In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait queues may be modified. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139304
| * Merge tcp_timer.c:1.68 from HEAD to RELENG_5:Robert Watson2004-12-251-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/23 16:45:07; author: rwatson; state: Exp; lines: +11 -15 De-spl tcp_slowtimo; tcp_maxidle assignment is subject to possible but unlikely races that could be corrected by having tcp_keepcnt and tcp_keepintvl modifications go through handler functions via sysctl, but probably is not worth doing. Updates to multiple sysctls within evaluation of a single addition are unlikely. Annotate that tcp_canceltimers() is currently unused. De-spl tcp_timer_delack(). De-spl tcp_timer_2msl(). MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139303
| * Merge tcp_subr.c:1.210 from HEAD to RELENG_5:Robert Watson2004-12-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/23 16:23:13; author: rwatson; state: Exp; lines: +10 -0 Assert the inpcb lock in tcp_twstart(), which does both read-modify-write on the tcpcb, but also calls into tcp_close() and tcp_twrespond(). Annotate that tcp_twrecycleable() requires the inpcb lock because it does a series of non-atomic reads of the tcpcb, but is currently called without the inpcb lock by the caller. This is a bug. Assert the inpcb lock in tcp_twclose() as it performs a read-modify-write of the timewait structure/inpcb, and calls in_pcbdetach() which requires the lock. Assert the inpcb lock in tcp_twrespond(), as it performs multiple non-atomic reads of the tcptw and inpcb structures, as well as calling mac_create_mbuf_from_inpcb(), tcpip_fillheaders(), which require the inpcb lock. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139302
| * Merge tcp_subr.c:1.209 from HEAD to RELENG_5:Robert Watson2004-12-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | date: 2004/11/23 16:06:15; author: rwatson; state: Exp; lines: +4 -0 Assert inpcb lock in tcp_quench(), tcp_drop_syn_sent(), tcp_mtudisc(), and tcp_drop(), due to read-modify-write of TCP state variables. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139301
| * Merge tcp_subr.c:1.208 from HEAD to RELENG_5:Robert Watson2004-12-251-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/23 15:59:43; author: rwatson; state: Exp; lines: +11 -4 Assert the tcbinfo write lock in tcp_new_isn(), as the tcbinfo lock protects access to the ISN state variables. Acquire the tcbinfo write lock in tcp_isn_tick() to synchronize timer-driven isn bumping. Staticize internal ISN variables since they're not used outside of tcp_subr.c. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139300
| * Merge portions of tcp_input.c:1.255 from HEAD to RELENG_5:Robert Watson2004-12-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/07 19:19:35; author: rwatson; state: Exp; lines: +5 -6 ... Free the mbuf at the end of tcp_input after releasing any held locks to reduce the time the locks are held. MFC after: 3 weeks Notes: svn path=/stable/5/; revision=139299
| * MFC rev 1.259; accept RSTs when our window is closed.Mike Silbersack2004-12-231-2/+3
| | | | | | | | Notes: svn path=/stable/5/; revision=139250
| * Merge ip_output.c:1.236 from HEAD to RELENG_5:Robert Watson2004-12-221-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/12/05 22:08:37; author: rwatson; state: Exp; lines: +14 -6 Pass the inpcb reference into ip_getmoptions() rather than just the inp->inp_moptions pointer, so that ip_getmoptions() can perform necessary locking when doing non-atomic reads. Lock the inpcb by default to copy any data to local variables, then unlock before performing sooptcopyout(). MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139176
| * Merge in_pcb.h:1.78 from HEAD to RELENG_5:Robert Watson2004-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | date: 2004/12/05 22:07:14; author: rwatson; state: Exp; lines: +1 -0 Define INP_UNLOCK_ASSERT() to assert that an inpcb is unlocked. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139175
| * Merge ip_output.c:1.233 (and forced commit MFC reminderRobert Watson2004-12-221-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ip_output.c:1.234) from HEAD to RELENG_5: date: 2004/12/05 19:11:09; author: rwatson; state: Exp; lines: +13 -10 Start working through inpcb locking for ip_ctloutput() by cleaning up modifications to the inpcb IP options mbuf: - Lock the inpcb before passing it into ip_pcbopts() in order to prevent simulatenous reads and read-modify-writes that could result in races. - Pass the inpcb reference into ip_pcbopts() instead of the option chain pointer in the inpcb. - Assert the inpcb lock in ip_pcbots. - Convert one or two uses of a pointer as a boolean or an integer comparison to a comparison with NULL for readability. Notes: svn path=/stable/5/; revision=139174
| * Merge tcp_input.c:1.260 from HEAD to RELENG_5:Robert Watson2004-12-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/28 11:01:31; author: rwatson; state: Exp; lines: +3 -2 Expand coverage of the receive socket buffer lock when handling urgent pointer updates: test available space while holding the socket buffer mutex, and continue to hold until until the pointer update has been performed. MFC after: 2 weeks Notes: svn path=/stable/5/; revision=139173
| * MFC: in.c, rev. 1.78-1.80 and if_ether.c, rev. 1.132Max Laier2004-12-122-30/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the way we automatically add prefix routes when adding a new address. This makes it possible to have more than one address with the same prefix. The first address added is used for the route. On deletion of an address with IFA_ROUTE set, we try to find a "fallback" address and hand over the route if possible. Obtained from: Open/NetBSD Discussed on: -net, -arch A lot of help: ru Notes: svn path=/stable/5/; revision=138750
| * MFC:Gleb Smirnoff2004-12-111-0/+7
| | | | | | | | | | | | | | Make route caching for gif(4) optional and disabled by default. Notes: svn path=/stable/5/; revision=138686
| * MFC: rev 1.106Paul Saab2004-12-061-2/+4
| | | | | | | | | | | | | | Fixes a bug in SACK causing us to send data beyond the receive window. Notes: svn path=/stable/5/; revision=138462
| * MFC: support TCP-MD5(IPv4) in KAME-IPSEC, too.SUZUKI Shinsuke2004-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | 1.207 src/sys/netinet/tcp_subr.c 1.24 src/sys/netinet6/ah_core.c 1.69 src/sys/netkey/key.c 1.11 src/sys/netkey/key.h 1.11 src/sys/netkey/keydb.h Notes: svn path=/stable/5/; revision=138250
| * Merge tcp_input.c:1.256 from HEAD to RELENG_5:Robert Watson2004-11-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/22 13:16:27; author: rwatson; state: Exp; lines: +0 -3 Remove "Unlocked read" annotations associated with previously unlocked use of socket buffer fields in the TCP input code. These references are now protected by use of the receive socket buffer lock. MFC after: 1 week Notes: svn path=/stable/5/; revision=138181
| * MFC 1.110:Gleb Smirnoff2004-11-231-34/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Since divert protocol is not connection oriented, remove SS_ISCONNECTED flag from divert sockets. - Remove div_disconnect() method, since it shouldn't be called now. - Remove div_abort() method. It was never called directly, since protocol doesn't have listen queue. It was called only from div_disconnect(), which is removed now. MFC part of 1.109: - in the beginning of div_output() replace KASSERT with assignment, as it was in rev. 1.83. Notes: svn path=/stable/5/; revision=138017
| * Merge udp_usrreq.c:1.169 from HEAD to RELENG_5:Robert Watson2004-11-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/04 07:14:03; author: phk; state: Exp; lines: +2 -0 Hide udp_in6 behind #ifdef INET6 Spotted by: kensmith CVg: Notes: svn path=/stable/5/; revision=137996
| * Merge udp_usrreq.c:1.168 from HEAD to RELENG_5:Robert Watson2004-11-221-57/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/11/04 01:25:23; author: rwatson; state: Exp; lines: +24 -57 Until this change, the UDP input code used global variables udp_in, udp_in6, and udp_ip6 to pass socket address state between udp_input(), udp_append(), and soappendaddr_locked(). While fine in the default configuration, when running with multiple netisrs or direct ithread dispatch, this can result in races wherein user processes using recvmsg() get back the wrong source IP/port. To correct this and related races: - Eliminate udp_ip6, which is believed to be generated but then never used. Eliminate ip_2_ip6_hdr() as it is now unneeded. - Eliminate setting, testing, and existence of 'init' status fields for the IPv6 structures. While with multiple UDP delivery this could lead to amortization of IPv4 -> IPv6 conversion when delivering an IPv4 UDP packet to an IPv6 socket, it added substantial complexity and side effects. - Move global structures into the stack, declaring udp_in in udp_input(), and udp_in6 in udp_append() to be used if a conversion is required. Pass &udp_in into udp_append(). - Re-annotate comments to reflect updates. With this change, UDP appears to operate correctly in the presence of substantial inbound processing parallelism. This solution avoids introducing additional synchronization, but does increase the potential stack depth. Discovered by: kris (Bug Magnet) MFC after: 3 weeks Note that this bug does not effect the default configuration, only systems running with net.isr.enable=1, or with modified network stacks to increase parallelism. Notes: svn path=/stable/5/; revision=137989
| * MFC:Paul Saab2004-11-085-51/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Estimate the amount of data in flight in sack recovery and use it to control the packets injected while in sack recovery (for both retransmissions and new data). - Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c. - Add a new sysctl (net.inet.tcp.sack.initburst) that controls the number of sack retransmissions done upon initiation of sack recovery. Submitted by: Mohan Srinivasan <mohans@yahoo-inc.com> Notes: svn path=/stable/5/; revision=137373
| * Merge tcp_output.c:1.104 from HEAD to RELENG_5:Robert Watson2004-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/10/30 12:02:50; author: rwatson; state: Exp; lines: +2 -2 Correct a bug in TCP SACK that could result in wedging of the TCP stack under high load: only set function state to loop and continuing sending if there is no data left to send. RELENG_5_3 candidate. Feet provided: Peter Losher <Peter underscore Losher at isc dot org> Diagnosed by: Aniel Hartmeier <daniel at benzedrine dot cx> Submitted by: mohan <mohans at yahoo-inc dot com> Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=137075
| * MFC rev 1.131:Bruce M Simpson2004-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Check that rt_mask(rt) is non-NULL before dereferencing it, in the RTM_ADD case, thus avoiding a panic. PR: kern/42030 Submitted by: Iasen Kostov Approved by: re@ Notes: svn path=/stable/5/; revision=136972
| * Merge kern_descrip.c:1.246, uipc_socket.c:1.214, uipc_usrreq.c:1.141,Robert Watson2004-10-202-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_cb.c:1.30, raw_usrreq.c:1.35, ddp_pcb.c:1.45, atm_socket.c:1.21, ng_btsocket_hci_raw.c:1.16, ng_btsocket_l2cap.c:1.14, ng_btsocket_l2cap_raw.c:1.13, ng_btsocket_rfcomm.c:1.13, in_pcb.c:1.156, tcp_subr.c:1.205, in6_pcb.c:1.61, ipx_pcb.c:1.29, ipx_usrreq.c:1.41, natm.c:1.35, socketvar.h:1.135 from HEAD to RELENG_5: Push acquisition of the accept mutex out of sofree() into the caller (sorele()/sotryfree()): - This permits the caller to acquire the accept mutex before the socket mutex, avoiding sofree() having to drop the socket mutex and re-order, which could lead to races permitting more than one thread to enter sofree() after a socket is ready to be free'd. - This also covers clearing of the so_pcb weak socket reference from the protocol to the socket, preventing races in clearing and evaluation of the reference such that sofree() might be called more than once on the same socket. This appears to close a race I was able to easily trigger by repeatedly opening and resetting TCP connections to a host, in which the tcp_close() code called as a result of the RST raced with the close() of the accepted socket in the user process resulting in simultaneous attempts to de-allocate the same socket. The new locking increases the overhead for operations that may potentially free the socket, so we will want to revise the synchronization strategy here as we normalize the reference counting model for sockets. The use of the accept mutex in freeing of sockets that are not listen sockets is primarily motivated by the potential need to remove the socket from the incomplete connection queue on its parent (listen) socket, so cleaning up the reference model here may allow us to substantially weaken the synchronization requirements. RELENG_5_3 candidate. MFC after: 3 days Reviewed by: dwhite Discussed with: gnn, dwhite, green Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de> Reported by: Vlad <marchenko at gmail dot com> MFC after: 1 day Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136727
| * Merge udp_usrreq.c:1.167 from HEAD to RELENG_5:Robert Watson2004-10-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/10/12 20:03:56; author: rwatson; state: Exp; lines: +3 -3 Don't release the udbinfo lock until after the last use of UDP inpcb in udp_input(), since the udbinfo lock is used to prevent removal of the inpcb while in use (i.e., as a form of reference count) in the in-bound path. RELENG_5 candidate. Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136511
| * Merge raw_ip.c:1.145 from HEAD to RELENG_5:Robert Watson2004-10-141-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/10/12 16:47:25; author: rwatson; state: Exp; lines: +41 -20 When the access control on creating raw sockets was modified so that processes in jail could create raw sockets, additional access control checks were added to raw IP sockets to limit the ways in which those sockets could be used. Specifically, only the socket option IP_HDRINCL was permitted in rip_ctloutput(). Other socket options were protected by a call to suser(). This change was required to prevent processes in a Jail from modifying system properties such as multicast routing and firewall rule sets. However, it also introduced a regression: processes that create a raw socket with root privilege, but then downgraded credential (i.e., a daemon giving up root, or a setuid process switching back to the real uid) could no longer issue other unprivileged generic IP socket option operations, such as IP_TOS, IP_TTL, and the multicast group membership options, which prevented multicast routing daemons (and some other tools) from operating correctly. This change pushes the access control decision down to the granularity of individual socket options, rather than all socket options, on raw IP sockets. When rip_ctloutput() doesn't implement an option, it will now pass the request directly to in_control() without an access control check. This should restore the functionality of the generic IP socket options for raw sockets in the above-described scenarios, which may be confirmed with the ipsockopt regression test. RELENG_5 candidate. Reviewed by: csjp Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136509
| * MFC r1.78: further rule verification (against corrupt rules added by root).Brian Feldman2004-10-131-0/+5
| | | | | | | | | | | | | | Approved by: re Notes: svn path=/stable/5/; revision=136495
| * Merge tcp_output.c:1.103 from HEAD to RELENG_5:Robert Watson2004-10-121-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/10/09 16:48:51; author: rwatson; state: Exp; lines: +14 -2 Acquire the send socket buffer lock around tcp_output() activities reaching into the socket buffer. This prevents a number of potential races, including dereferencing of sb_mb while unlocked leading to a NULL pointer deref (how I found it). Potentially this might also explain other "odd" TCP behavior on SMP boxes (although haven't seen it reported). Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=136443
| * Merge ip_mroute.c:1.109 to RELENG_5:Robert Watson2004-10-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date: 2004/10/07 14:13:35; author: rwatson; state: Exp; lines: +7 -4 When running with debug.mpsafenet=0, initialize IP multicast routing callouts as non-CALLOUT_MPSAFE. Otherwise, they may trigger an assertion regarding Giant if they enter other parts of the stack from the callout. MFC after: 3 days Reported by: Dikshie < dikshie at ppk dot itb dot ac dot id > Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136314
| * MFC pfil API change:Max Laier2004-10-036-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an additional struct inpcb * argument to pfil(9) in order to enable passing along socket information. This is required to work around a LOR with the socket code which results in an easy reproducible hard lockup with debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us to do so later. The missing piece is to turn the filter locking into a leaf lock and will follow in a seperate (later) commit. Suggested by: rwatson A lot of work by: csjp LOR IDs: 14 - 17 (not fixed yet) Approved by: re (scottl) Notes: svn path=/stable/5/; revision=136098
| * MFC rev. 1.290: turn net.inet.ip.check_interface sysctl off by default.Maxim Konovalov2004-09-241-1/+1
| | | | | | | | | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135732
| * MFC 1.289: Proper bounds checking when initializing the ip_protox[] array.Andre Oppermann2004-09-231-4/+14
| | | | | | | | | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135624
| * MFC: Store IP source routing options in mtag instead of global variable.Andre Oppermann2004-09-234-39/+48
| | | | | | | | | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135623
| * MFC: Make PFIL_HOOKS a permanent part of the kernel and remove the associatedAndre Oppermann2004-09-225-48/+28
| | | | | | | | | | | | | | | | | | kernel compile option. Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135580
| * MFC 1.129:Gleb Smirnoff2004-09-171-11/+5
| | | | | | | | | | | | | | | | | | | | Check flag do_bridge always, even if kernel was compiled without BRIDGE support. This makes dynamic bridge.ko working. Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135398
| * MFC 1.76: Return EINVAL when IPFIREWALL_FORWARD is not compiled into the kernel.Andre Oppermann2004-09-161-0/+4
| | | | | | | | | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135316
| * MFC 1.9: Don't prepend an already existing tag again.Andre Oppermann2004-09-161-3/+5
| | | | | | | | | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135315
| * MFC 1.20: Fix ip_input() fallback for the destination modified cases.Andre Oppermann2004-09-161-6/+4
| | | | | | | | | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135314
| * MFC: Make 'ipfw tee' behave as intended and designed.Andre Oppermann2004-09-161-11/+11
| | | | | | | | | | | | | | Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135313
| * MFC: Apply error and success logic consistently to the function netisr_queue()Andre Oppermann2004-09-151-1/+1
| | | | | | | | | | | | | | | | | | and its users. Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135266
| * MFC 1.229: Replace ifunit("lo0") with direct 'loif' pointer.Andre Oppermann2004-09-151-2/+2
| | | | | | | | | | | | | | Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135265
| * Allocate memory when dumping pipes with M_WAITOK flag.Pawel Jakub Dawidek2004-09-141-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system with huge number of pipes, M_NOWAIT failes almost always, because of memory fragmentation. My fix is different than the patch proposed by Pawel Malachowski, because in FreeBSD 5.x we cannot sleep while holding dummynet mutex (in 4.x there is no such lock). PR: kern/46557 Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> Reviewed by: mlaier Approved by: re (scottl) Notes: svn path=/stable/5/; revision=135230
| * MFC: v1.230John-Mark Gurney2004-09-141-3/+1
| | | | | | | | | | | | | | | | | | > revert comment from rev1.158 now that rev1.225 backed it out.. Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135199
| * MFC rev.1.75: recover normal behavior: return EINVAL to attemptMaxim Konovalov2004-09-131-2/+5
| | | | | | | | | | | | | | | | | | to add a divert rule when module is built without IPDIVERT. Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=135136
| * MFC netinet/ip_mroute.c v.1.107Christian S.J. Peron2004-09-022-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC netinet/raw_ip.c v1.143 When a prison is given the ability to create raw sockets (when the security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged access to jails is given out, it is possible for prison root to manipulate various network parameters which effect the host environment. This commit plugs a number of security holes associated with the use of raw sockets and prisons. This commit makes the following changes: - Add a comment to rtioctl warning developers that if they add any ioctl commands, they should use super-user checks where necessary, as it is possible for PRISON root to make it this far in execution. - Add super-user checks for the execution of the SIOCGETVIFCNT and SIOCGETSGCNT IP multicast ioctl commands. - Add a super-user check to rip_ctloutput(). If the calling cred is PRISON root, make sure the socket option name is IP_HDRINCL, otherwise deny the request. Although this patch corrects a number of security problems associated with raw sockets and prisons, the warning in jail(8) should still apply, and by default we should keep the default value of security.jail.allow_raw_sockets MIB to 0 (or disabled) until we are certain that we have tracked down all the problems. Looking forward, we will probably want to eliminate the references to curthread. Approved by: re (kensmith) Notes: svn path=/stable/5/; revision=134637