aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* Direct commit (r184414 is not applicable to stable due to ABI change):Oleg Bulyzhin2008-10-311-2/+3
| | | | | | | | | | | | | Workaround possible q_time overflow (will happen after 2^32/(86400*hz) days of uptime (~50days for hz = 1000)), which may lead to: - broken shaping in 'fast' io mode. - incorrect average queue length calculation in RED/GRED algorithm. PR: kern/128401 Approved by: re (kensmith) Notes: svn path=/releng/6.4/; revision=184506
* MFC change 182488Christian S.J. Peron2008-10-131-6/+6
| | | | | | | | | Improve entropy in source port generation for libalias consumers. Approved by: re (kib) Notes: svn path=/releng/6.4/; revision=183837
* MFC: 178280John Baldwin2008-09-252-3/+6
| | | | | | | | | | | | - Clean up the code that checks the types of address so that it is done by understandable macros. - Fix the bug that prevented the system from responding on interfaces with link local addresses assigned. Approved by: re (gnn) Notes: svn path=/stable/6/; revision=183358
* MFC: svn r182885, cvs rev. 1.381 tcp_input.cBjoern A. Zeeb2008-09-121-1/+3
| | | | | | | | | | | | | | | | | Work around an integer division resulting in 0 and thus the congestion window not being incremented, if cwnd > maxseg^2. As suggested in RFC2581 increment the cwnd by 1 in this case. See http://caia.swin.edu.au/reports/080829A/CAIA-TR-080829A.pdf for more details. Submitted by: Alana Huebner, Lawrence Stewart, Grenville Armitage (caia.swin.edu.au) Reviewed by: dwmalone, gnn, rpaulo, silby Approved by: re (gnn) Notes: svn path=/stable/6/; revision=182971
* Backout r182652 - as it breaks the build (due to `IN6_IS_SCOPE_EMBED').David E. O'Brien2008-09-011-39/+13
| | | | | | | [My apologies for backing this out, but we're up against a code freeze] Notes: svn path=/stable/6/; revision=182656
* MFC: r179490Max Laier2008-09-011-13/+39
| | | | | | | | | | | Sort IP addresses before hashing them for the signature. Otherwise carp is sensitive to address configuration order. PR: kern/121574 Forgotten by: mlaier Notes: svn path=/stable/6/; revision=182652
* MFC r181824Andrew Thompson2008-09-011-1/+24
| | | | | | | | Fix ARP in bridging scenarios where the bridge shares its MAC address with one of its members. Notes: svn path=/stable/6/; revision=182586
* MFC: If we hit the global cache size limit but the bucket row is emptyJohn Baldwin2008-07-301-0/+6
| | | | | | | | then we won't find an entry to recycle, so just return NULL and fail the insert. Notes: svn path=/stable/6/; revision=181015
* MFC r179971:Oleksandr Tymoshenko2008-07-191-0/+8
| | | | | | | | | | | | | | | In case of interface initialization failure remove struct in_ifaddr* from in_ifaddrhashtbl in in_ifinit because error handler in in_control removes entries only for AF_INET addresses. If in_ifinit is called for the cloned inteface that has just been created its address family is not AF_INET and therefor LIST_REMOVE is not called for respective LIST_INSERT_HEAD and freed entries remain in in_ifaddrhashtbl and lead to memory corruption. PR: kern/124384 MFC after: 3 weeks Notes: svn path=/stable/6/; revision=180611
* MFC:David Malone2008-05-201-2/+9
| | | | | | | | | Dummynet has a limit of 100 slots queue size (or 1MB, if you give the limit in bytes) hard coded into both the kernel and userland. Make both these limits a sysctl, so it is easy to change the limit. Notes: svn path=/stable/6/; revision=179150
* MFC:David Malone2008-05-201-3/+6
| | | | | | | | | | If we are walking the IPv6 header chain and we hit an IPPROTO_NONE header, then don't try to pullup anything, because there is no next header if we hit IPPROTO_NONE. Set ulp to a non-NULL value so the search for an upper layer header terinates. Notes: svn path=/stable/6/; revision=179148
* MFC:Oleg Bulyzhin2008-04-253-360/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/sys/netinet/ip_dummynet.h 1.41 src/sys/netinet/ip_dummynet.c 1.111-1.114 src/sys/netinet/ip_fw_pfil.c 1.26 src/sys/net/if_bridge.c 1.107 src/sys/net/if_ethersubr.c 1.240 src/sbin/ipfw/ipfw.8 1.206 - style(9) cleanup. - dummynet_io() declaration has changed. - Alter packet flow inside dummynet and introduce 'fast' mode of dummynet operation: allow certain packets to bypass dummynet scheduler. Benefits are: -- lower latency: if packet flow does not exceed pipe bandwidth, packets will not be (up to tick) delayed (due to dummynet's scheduler granularity). -- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter ip stack later. Such packets can be fastforwarded. -- recursion (which can lead to kernel stack exhaution) eliminated. This fix long existed panic, which can be triggered this way: kldload dummynet sysctl net.inet.ip.fw.one_pass=0 ipfw pipe 1 config bw 0 for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done ping -c 1 localhost - New sysctl nodes: net.inet.ip.dummynet.io_fast - enables 'fast' dummynet io net.inet.ip.dummynet.io_pkt - packets passed to dummynet net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet - Workaround p->numbytes overflow, which can result in infinite loop inside dummynet module (prerequisite is using queues with "fat" pipe). PR: kern/113548 kern/121955 Notes: svn path=/stable/6/; revision=178486
* MFC: explicitate newpacket size.Paolo Pisati2008-03-192-13/+14
| | | | | | | | Bug pointed out by: many Pointy hat to: me :( Notes: svn path=/stable/6/; revision=177384
* MFC Revision 1.25:Paolo Pisati2008-03-182-2/+17
| | | | | | | | | Don't abuse stack space while in kernel land, use heap instead. PR: kern/118432 Notes: svn path=/stable/6/; revision=177351
* Fix reference counting for already existing addresses in in_addmulti()Stephan Uphoff2008-02-221-1/+0
| | | | | | | Reviewed by: gnn@ Notes: svn path=/stable/6/; revision=176468
* Belated MFC of rev. 1.49:Gleb Smirnoff2008-02-011-2/+6
| | | | | | | | | Do not leak lock in the case of EEXIST error. PR: kern/92776 Notes: svn path=/stable/6/; revision=175869
* MFC: Expose smoothed RTT and RTT variance measurements to userland viaJohn Baldwin2008-01-242-2/+6
| | | | | | | socket option TCP_INFO. Notes: svn path=/stable/6/; revision=175649
* Merge in_pcb.c:1.198 from HEAD to RELENG_6:Robert Watson2007-12-221-1/+5
| | | | | | | | | | | | | When IPSEC fails to allocate policy state for an inpcb, and MAC is in use, free the MAC label on the inpcb before freeing the inpcb. Submitted by: tanyong <tanyong at ercist dot iscas dot ac dot cn>, zhouzhouyi Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=174871
* MFC: scale TCPTV_MIN with hz, not a fixed number of ticks. OtherwisePeter Wemm2007-12-182-1/+3
| | | | | | | | | machines with hz=1000 drop connections in a matter of a few seconds on a fast link (eg: ethernet). With this change, it drops them in the same time as a machine with hz=100 would. Notes: svn path=/stable/6/; revision=174743
* MFC: 1.334Guido van Rooij2007-12-171-1/+2
| | | | Notes: svn path=/stable/6/; revision=174710
* MFC: -r1.296Qing Li2007-12-141-2/+2
| | | | | | | | | use the sequence number comparison macro to compare projected_offset against isn_offset to account for wrap around Notes: svn path=/stable/6/; revision=174592
* o Update tcp sendcookie stats. HEAD has a different code and doesMaxim Konovalov2007-09-281-0/+1
| | | | | | | | | | not have this bug. Submitted by: Igor Sysoev Reviewed by: silby Notes: svn path=/stable/6/; revision=172384
* MFC revs. 1.15, 1.16:Yaroslav Tykhiy2007-07-121-4/+9
| | | | | | | | | | | Add a sysctl for the purge run interval so that it can be tuned along with the rest of hostcache parameters. The new sysctl name is `net.inet.tcp.hostcache.prune'. Replace a constant with an already defined symbolic name for it. Notes: svn path=/stable/6/; revision=171415
* Fix a problem introduced in netinet/in.c 1.85.2.7 whereBrian Somers2007-07-072-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in_ifdetach() calls in_delmulti_ifp(). The code now *really* deletes the elements in in_multihead for the ifp that's going away (rather than just decrementing the reference count). Previously we were left with inm and ifma structures containing bogus ifnet pointers after destroying an interface that had more than one IP4 assignment made to it in it's lifetime. I've also added a if_delmulti_ent() to make deleting known ifma structures possible rather than depending on if_findmulti() to end up finding the same thing. It will in fact always find the correct ifma *unless* the passed sockaddr has a bogus sa_len of zero. Finally, when adding a multicast address, we no longer increment the refcount (well, we do, but then we decrement it again). The refcount here is in fact bogus so hopefully readers will see that now. This code is going directly into -stable as it has been rewritten in -current and those changes are deemed too intrusive for -stable consumption right now. Reviewed by: bms Notes: svn path=/stable/6/; revision=171289
* MFC 1.30: Certain (bad) values of sack blocks can end up corrupting theJohn Baldwin2007-06-121-0/+2
| | | | | | | | sack scoreboard. Make the checks in tcp_sack_doack() more robust to prevent this. Notes: svn path=/stable/6/; revision=170628
* MFC 1.28: Fix for a bug that causes SACK scoreboard corruption when theJohn Baldwin2007-06-121-6/+21
| | | | | | | limit on holes per connection is reached. Notes: svn path=/stable/6/; revision=170627
* MFC 1.315: In the SYN_SENT case, Initialize the snd_wnd before the call toJohn Baldwin2007-06-121-1/+1
| | | | | | | | tcp_mss(). The TCP hostcache logic in tcp_mss() depends on the snd_wnd being initialized. Notes: svn path=/stable/6/; revision=170623
* MFC 1.209: Don't verify UDP IPv4 checksum in-place.David Malone2007-06-101-5/+6
| | | | Notes: svn path=/stable/6/; revision=170496
* MFC:Bjoern A. Zeeb2007-06-072-0/+6
| | | | | | | | | | | | 1.200 sbin/ipfw/ipfw.8, 1.104 sbin/ipfw/ipfw2.c 1.110 sys/netinet/ip_fw.h, 1.164 sys/netinet/ip_fw2.c Add support for filtering on Routing Header Type 0 and Mobile IPv6 Routing Header Type 2 in addition to filter on the non-differentiated presence of any Routing Header. Notes: svn path=/stable/6/; revision=170398
* Merge 1.47:Gleb Smirnoff2007-06-061-8/+7
| | | | | | | | | | | Make it possible that carpdetach() unlocks on return. Then, in carp_clone_destroy() we are on a safe side, we don't need to unlock the cif, that can me already non-existent at this point. Reported by: Anton Yuzhaninov <citrin rambler-co.ru> Notes: svn path=/stable/6/; revision=170377
* MFC: Fix statistical accounting for bytes and packets during sackJohn Baldwin2007-05-251-1/+1
| | | | | | | retransmits. Notes: svn path=/stable/6/; revision=169989
* MFC:JINMEI Tatuya2007-05-251-0/+5
| | | | | | | | | | | | | | | | | | - Disabled responding to NI queries from a global address by default as specified in RFC4620. A new flag for icmp6_nodeinfo was added to enable the feature. - Also cleaned up the code so that the semantics of the icmp6_nodeinfo flags is clearer (i.e., defined specific macro names instead of using hard-coded values). Approved by: gnn (mentor) src/sys/netinet/icmp6.h: 1.21 src/sys/netinet6/icmp6.c: 1.76 src/sys/netinet6/in6_proto.c: 1.43 Notes: svn path=/stable/6/; revision=169974
* MFC revs. 1.30, 1.31: fix strtoul() error conditions check, kill EOLWS.Maxim Konovalov2007-05-141-3/+3
| | | | Notes: svn path=/stable/6/; revision=169555
* Re-MFC 1.112 and this time include the fix for a bug in it (MFC of 1.162)Julian Elischer2007-05-081-24/+33
| | | | | | | | | This changes to using a monotomic time referrence for all time based operations. Changing the time should no longer accellerate ipfw operations. Notes: svn path=/stable/6/; revision=169390
* Merge ip_fw2.c:1.163 to RELENG_6:Robert Watson2007-04-201-1/+1
| | | | | | | | | Shorten text string for ip_fw2 dynamic rules zone by removing the word "zone", which is generally not present in zone names. This reduces the incidence of line-wrapping in "vmstat -z " using 80-column displays. Notes: svn path=/stable/6/; revision=168910
* MFC: Prevent the usage of an uninitialized variable: do not acceptPaolo Pisati2007-04-101-0/+11
| | | | | | | | | | StartMediaTx message before an OpnRcvChnAck message was received. Found with: Coverity Prevent(tm) CID: 498 Notes: svn path=/stable/6/; revision=168597
* MFC: Silence Coverity about an unused variable.Paolo Pisati2007-04-101-1/+1
| | | | | | | | Found with: Coverity Prevent(tm) CID: 538 Notes: svn path=/stable/6/; revision=168596
* Revert the MFC if 1.112 ( 1.106.2.27 )Julian Elischer2007-04-031-24/+24
| | | | | | | | It turns out that 1.112 has bug in -current which is faithfully reproduced in releng-6 with the MFC. Notes: svn path=/stable/6/; revision=168296
* Complete reversal of MFC:Julian Elischer2007-04-031-1/+1
| | | | | | | | I will investigate this further to possbly re-MFC it but for now play safe and revert this line too. Notes: svn path=/stable/6/; revision=168294
* Revert one of the MFCs from Friday as it produces anJulian Elischer2007-04-034-108/+63
| | | | | | | | unacceptable ABI change. I will re-MFC this when I have tested a version that brings back the desirable changes but leaves the ABI the same. Notes: svn path=/stable/6/; revision=168291
* unbreak build by puting back definition used by ipfw(8)Julian Elischer2007-03-311-0/+15
| | | | | | | | the real fix is to just remove the offending lines there but I don't have time to check that now. I'll do it right on Tuesday. Notes: svn path=/stable/6/; revision=168139
* MFC: 1.161Julian Elischer2007-03-311-0/+1
| | | | | | | | | | | | | | | include the opt_diver.h to get the banner massage right. This brings ip_fw2.c up to date with -current with the exception of: 1.113, 114, 125, 126, 130, 138, 140, 152-156, 158-160 All of which I do not believe to be MFC candidates (with the possible exception of 140 which has a risk factor I don't want to put in RELENG_6). 138 is also a possibility but requires more work in other files. I need to do the userland ipfw too to add some new features, but, not today.. Notes: svn path=/stable/6/; revision=168110
* MFC: 1.139Julian Elischer2007-03-311-2/+1
| | | | | | | Use the TAILQ macro. That's what it is for. Notes: svn path=/stable/6/; revision=168107
* MFC 1.37Julian Elischer2007-03-311-1/+1
| | | | | | | use less magic numbers. Notes: svn path=/stable/6/; revision=168106
* MFC: ip_fw2.c 1.129Julian Elischer2007-03-314-63/+108
| | | | | | | | | | ip_fw.h 1.105 ip_fw_pfil.c 1.21 ip_input.c 1.319 Allow ipv6 filtering to be seperately enabled. plus cleanup Notes: svn path=/stable/6/; revision=168105
* MFC: 1.128Julian Elischer2007-03-311-1/+5
| | | | | | | fix dmesg line if ipV6 not compiled in. Notes: svn path=/stable/6/; revision=168104
* MFC 1.116Julian Elischer2007-03-312-44/+1
| | | | | | | Remove unused items. I can not find them referenced anywhere else in the tree. Notes: svn path=/stable/6/; revision=168103
* MFC rev 1.40:Bruce M Simpson2007-03-291-1/+2
| | | | | | | | | | | In IPv4 fast forwarding path, send ICMP unreachable messages for routes which have RTF_REJECT set *and* a zero expiry timer. PR: kern/109246 Submitted by: Ingo Flaschberger Notes: svn path=/stable/6/; revision=168028
* We really don't need FreeBSD 4.x code in RELENG 6Julian Elischer2007-03-281-5/+0
| | | | | | | This is an MFC but I can't figure out where it was removed in head. Notes: svn path=/stable/6/; revision=167965
* MFC 1.112 mainly for diff reductionJulian Elischer2007-03-281-24/+24
| | | | | | | use time_uptime instead of time_second. Notes: svn path=/stable/6/; revision=167959