aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
...
* Mechanically substitute assertion of in_epoch(net_epoch_preempt) toGleb Smirnoff2020-01-152-6/+6
| | | | | | | NET_EPOCH_ASSERT(). NFC Notes: svn path=/head/; revision=356753
* Fix race when accepting TCP connections.Michael Tuexen2020-01-122-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When expanding a SYN-cache entry to a socket/inp a two step approach was taken: 1) The local address was filled in, then the inp was added to the hash table. 2) The remote address was filled in and the inp was relocated in the hash table. Before the epoch changes, a write lock was held when this happens and the code looking up entries was holding a corresponding read lock. Since the read lock is gone away after the introduction of the epochs, the half populated inp was found during lookup. This resulted in processing TCP segments in the context of the wrong TCP connection. This patch changes the above procedure in a way that the inp is fully populated before inserted into the hash table. Thanks to Paul <devgs@ukr.net> for reporting the issue on the net@ mailing list and for testing the patch! Reviewed by: rrs@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D22971 Notes: svn path=/head/; revision=356663
* nd6_rtr: constantly use __func__ for nd6log()Bjoern A. Zeeb2020-01-121-66/+58
| | | | | | | | | | | Over time one or two hard coded function names did not match the actual function anymore. Consistently use __func__ for nd6log() calls and re-wrap/re-format some messages for consitency. MFC after: 2 weeks Notes: svn path=/head/; revision=356662
* nd6_rtr: make nd6_prefix_onlink() staticBjoern A. Zeeb2020-01-122-2/+2
| | | | | | | | nd6_prefix_onlink() is not used anywhere outside nd6_rtr.c. Stop exporting it and make it file local static. Notes: svn path=/head/; revision=356661
* in6_mcast: make in6_joingroup_locked() staticBjoern A. Zeeb2020-01-112-5/+3
| | | | | | | | in6_joingroup_locked() is only used file-local. No need to export it hance make it static. Notes: svn path=/head/; revision=356638
* Add fibnum, family and vnet pointer to each rib head.Alexander V. Chernikov2020-01-092-4/+5
| | | | | | | | | | | | | Having metadata such as fibnum or vnet in the struct rib_head is handy as it eases building functionality in the routing space. This change is required to properly bring back route redirect support. Reviewed by: bz MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D23047 Notes: svn path=/head/; revision=356559
* vnet: virtualise more network stack sysctls.Bjoern A. Zeeb2020-01-081-1/+1
| | | | | | | | | | | | | | | | | Virtualise tcp_always_keepalive, TCP and UDP log_in_vain. All three are set in the netoptions startup script, which we would love to run for VNETs as well [1]. While virtualising the log_in_vain sysctls seems pointles at first for as long as the kernel message buffer is not virtualised, it at least allows an administrator to debug the base system or an individual jail if needed without turning the logging on for all jails running on a system. PR: 243193 [1] MFC after: 2 weeks Notes: svn path=/head/; revision=356527
* Fix rtsock route message generation for interface addresses.Alexander V. Chernikov2020-01-072-40/+23
| | | | | | | | | Reviewed by: olivier MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D22974 Notes: svn path=/head/; revision=356473
* In r343631 error code for a packet blocked by a firewall wasGleb Smirnoff2020-01-011-1/+1
| | | | | | | | | | changed from EACCES to EPERM. This change was not intentional, so fix that. Return EACCESS if a firewall forbids sending. Noticed by: ae Notes: svn path=/head/; revision=356253
* Remove useless code from in6_rmx.cAlexander V. Chernikov2019-12-181-63/+0
| | | | | | | | | | | | | | | | | | The code in questions walks IPv6 tree every 60 seconds and looks into the routes with non-zero expiration time (typically, redirected routes). For each such route it sets RTF_PROBEMTU flag at the expiration time. No other part of the kernel checks for RTF_PROBEMTU flag. RTF_PROBEMTU was defined 21 years ago, 30 Jun 1999, as RTF_PROTO1. RTF_PROTO1 is a de-facto standard indication of a route installed by a routing daemon for a last decade. Reviewed by: bz, ae MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22865 Notes: svn path=/head/; revision=355888
* Leave multicast group before reaping and committing state for bothHans Petter Selasky2019-12-181-7/+7
| | | | | | | | | | | | | | | | | | IPv4 and IPv6. This fixes a regression issue after r349369. When trying to exit a multicast group before closing the socket, a multicast leave packet should be sent. Differential Revision: https://reviews.freebsd.org/D22848 PR: 242677 Reviewed by: bz (network) Tested by: Aleksandr Fedorov <aleksandr.fedorov@itglobal.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=355881
* Update comment.Bjoern A. Zeeb2019-12-061-5/+4
| | | | | | | | | | | | | Update the comment related to SIIT and v4mapped addresses being rejected by us when coming from the wire given we have supported IPv6-only kernels for a few years now. See also draft-itojun-v6ops-v4mapped-harmful. Suggested by: melifaro MFC after: 2 weeks Notes: svn path=/head/; revision=355452
* ip6_input: remove redundant v4mapped checkBjoern A. Zeeb2019-12-061-18/+0
| | | | | | | | | | | | | | | In ip6_input() we apply the same v4mapped address check twice. The only case which skipps the first one is M_FASTFWD_OURS which should have passed the check on the firstinput pass and passed the firewall. Remove the 2nd redundant check. Reviewed by: kp, melifaro MFC after: 2 weeks Sponsored by: Netflix (originally) Differential Revision: https://reviews.freebsd.org/D22462 Notes: svn path=/head/; revision=355450
* Remove useless NULL checkKristof Provost2019-12-051-2/+1
| | | | | | | | | | | Coverity points out that we've already dereferenced m by the time we check, so there's no reason to keep the check. Moreover, it's safe to pass NULL to m_freem() anyway. CID: 1019092 Notes: svn path=/head/; revision=355425
* Make icmp6_reflect() static.Bjoern A. Zeeb2019-12-031-1/+2
| | | | | | | | | | icmp6_reflect() is not used anywhere outside icmp6.c, no reason to export it. Sponsored by: Netflix Notes: svn path=/head/; revision=355327
* Use refcount from "in_joingroup_locked()" when joining multicastHans Petter Selasky2019-12-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | groups. Do not acquire additional references. This makes the IPv4 IGMP code in line with the IPv6 MLD code. Background: The IPv4 multicast code puts an extra reference on the in_multi struct when joining groups. This becomes visible when using daemons like igmpproxy from ports, that multicast entries do not disappear from the output of ifmcstat(8) when multicast streams are disconnected. This fixes a regression issue after r349762. While at it factor the ip_mfilter_insert() and ip6_mfilter_insert() calls to avoid repeated "is_new" check. Differential Revision: https://reviews.freebsd.org/D22595 Tested by: Guido van Rooij <guido@gvr.org> Reviewed by: rgrimes (network) MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=355322
* Update the hostcache also for PTB messages received for SCTP/IPv6.Michael Tuexen2019-12-011-0/+5
| | | | | | | | | | | | The corresponding code for SCTP/IPv4 was introduced in https://svnweb.freebsd.org/base?view=revision&revision=317597 Submitted by: Julius Flohr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22605 Notes: svn path=/head/; revision=355264
* Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros.Bjoern A. Zeeb2019-12-0111-124/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | r354748-354750 replaced the KAME macros with m_pulldown() calls. Contrary to the rest of the network stack m_len checks before m_pulldown() were not put in placed (see r354748). Put these m_len checks in place for now (to go along with the style of the network stack since the initial commits). These are not put in for performance but to avoid an error scenario (even though it also will help performance at the moment as it avoid allocating an extra mbuf; not because of the unconditional function call). The observed error case went like this: (1) an mbuf with M_EXT arrives and we call m_pullup() unconditionally on it. (2) m_pullup() will call m_get() unless the requested length is larger than MHLEN (in which case it'll m_freem() the perfectly fine mbuf) and migrate the requested length of data and pkthdr into the new mbuf. (3) If m_get() succeeds, a further m_pullup() call going over MHLEN will fail. This was observed with failing auto-configuration as an RA packet of 200 bytes exceeded MHLEN and the m_pullup() called from nd6_ra_input() dropped the mbuf. (Re-)adding the m_len checks before m_pullup() calls avoids this problems with mbufs using external storage for now. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=355254
* in6_joingroup_locked: need if_addr_lock around in6m_disconnect_lockedRyan Libby2019-11-251-0/+2
| | | | | | | | | | | It looks like the call that requires the lock was introduced in r337866. Reviewed by: hselasky Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20739 Notes: svn path=/head/; revision=355102
* in6: move includeBjoern A. Zeeb2019-11-191-2/+1
| | | | | | | | | | | | | | Move the include for sysctl.h out of the middle of the file to the includes at the beginning. This is will make it easier to add new sysctls. No functional changes. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354865
* nd6: sysctlBjoern A. Zeeb2019-11-191-12/+10
| | | | | | | | | | | | | | Move the SYSCTL_DECL to the top of the file. Move the sysctl function before SYSCTL_PROC so that we don't need an extra function declaration in the middle of the file. No functional changes. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354863
* nd6: make nd6_timer_ch staticBjoern A. Zeeb2019-11-191-1/+1
| | | | | | | | | | | nd6_timer_ch is only used in file local context. There is no need to export it, so make it static. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354862
* nd6_rtr: re-sort functionsBjoern A. Zeeb2019-11-191-365/+350
| | | | | | | | | | | | | | Resort functions within file in a way that they depend on each other as that makes it easier to rework various things. Also allows us to remove file local function declarations. No functional changes. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354861
* mld: fix epoch assertionBjoern A. Zeeb2019-11-191-0/+8
| | | | | | | | | | | | | | | | | in6ifa_ifpforlinklocal() asserts the net epoch. The test case from r354832 revealed code paths where we call into the function without having acquired the net epoch first and consequently we hit the assert. This happens in certain MLD states during VNET shutdown and most people normaly not notice this. For correctness acquire the net epoch around calls to mld_v1_transmit_report() in all cases to avoid the assertion firing. MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354855
* icmpv6: Fix mbuf change in mldBjoern A. Zeeb2019-11-183-3/+6
| | | | | | | | | | | | | | | | | | | | After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid leading to a panic. Pass a pointer to the mbuf to mld_input() so we can return an updated version in the non-error case. Add a test sending an MLD packet case which will trigger this bug. Pointyhat to: bz Reported by: gallatin, thj MFC After: 2 weeks X-MFC with: r354748 Sponsored by: Netflix Notes: svn path=/head/; revision=354832
* nd6: retire defrouter_select(), use _fib() variant.Bjoern A. Zeeb2019-11-163-13/+2
| | | | | | | | | | | Burn bridges and replace the last two calls of defrouter_select() with defrouter_select_fib(). That allows us to retire defrouter_select() and make it more clear in the calling code that it applies to all FIBs. Sponsored by: Netflix Notes: svn path=/head/; revision=354758
* nd6_rtr:Bjoern A. Zeeb2019-11-162-28/+28
| | | | | | | | | | | | | | | | | Pull in the TAILQ_HEAD() as it is not needed outside nd6_rtr.c. Rename the TAILQ_HEAD() struct and the nd_defrouter variable from "nd_" to "nd6_" as they are not part of the RFC 3542 API which uses "ND_". Ideally I'd like to also rename the struct nd_defrouter {} to "nd6_*" but given that is used externally there is more work to do. No functional changes. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354757
* netinet*: replace IP6_EXTHDR_GET()Bjoern A. Zeeb2019-11-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | In a few places we have IP6_EXTHDR_GET() left in upper layer protocols. The IP6_EXTHDR_GET() macro might perform an m_pulldown() in case the data fragment is not contiguous. Convert these last remaining instances into m_pullup()s instead. In CARP, for example, we will a few lines later call m_pullup() anyway, the IPsec code coming from OpenBSD would otherwise have done the m_pullup() and are copying the data a bit later anyway, so pulling it in seems no better or worse. Note: this leaves very few m_pulldown() cases behind in the tree and we might want to consider removing them as well to make mbuf management easier again on a path to variable size mbufs, especially given m_pulldown() still has an issue not re-checking M_WRITEABLE(). Reviewed by: gallatin MFC after: 8 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22335 Notes: svn path=/head/; revision=354749
* netinet6: Remove PULLDOWN_TESTs.Bjoern A. Zeeb2019-11-1510-382/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the KAME introduced PULLDOWN_TESTs which did not even have a compile-time option in sys/conf to turn them on for a custom kernel build. They made the code a lot harder to read or more complicated in a few cases. Convert the IP6_EXTHDR_CHECK() calls into FreeBSD looking code. Rather than throwing the packet away if it would not fit the KAME mbuf expectations, convert the macros to m_pullup() calls. Do not do any extra manual conditional checks upfront as to whether the m_len would suffice (*), simply let m_pullup() do its work (incl. an early check). Remove extra m_pullup() calls where earlier in the function or the only caller has already done the pullup. Discussed with: rwatson (*) Reviewed by: ae MFC after: 8 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22334 Notes: svn path=/head/; revision=354748
* nd6: simplify codeBjoern A. Zeeb2019-11-151-7/+1
| | | | | | | | | | | We are taking the same actions in both cases of the branch inside the block. Simplify that code as the extra branch is not needed. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354731
* nd6: remove unused structs and definesBjoern A. Zeeb2019-11-131-73/+1
| | | | | | | | | | Remove a collections of unused structs and #defines to make it easier to understand what is actually in use. Sponsored by: Netflix Notes: svn path=/head/; revision=354682
* nd6: make nd6_alloc() file staticBjoern A. Zeeb2019-11-132-2/+1
| | | | | | | | | | nd6_alloc() is a function used only locally. Make it static and no longer export it. Keeps the KPI smaller. Sponsored by: Netflix Notes: svn path=/head/; revision=354681
* nd6 defrouter: consolidate nd_defrouter manipulations in nd6_rtr.cBjoern A. Zeeb2019-11-133-161/+204
| | | | | | | | | | | | | | | | | | | Move the nd_defrouter along with the sysctl handler from nd6.c to nd6_rtr.c and make the variable file static. Provide (temporary) new accessor functions for code manipulating nd_defrouter from nd6.c, and stop exporting functions no longer needed outside nd6_rtr.c. This also shuffles a few functions around in nd6_rtr.c without functional changes. Given all nd_defrouter logic is now in one place we can tidy up the code, locking and, and other open items. MFC after: 3 weeks X-MFC: keep exporting the functions Sponsored by: Netflix Notes: svn path=/head/; revision=354680
* netinet*: update *mp to pass the proper value backBjoern A. Zeeb2019-11-126-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | In ip6_[direct_]input() we are looping over the extension headers to deal with the next header. We pass a pointer to an mbuf pointer to the handling functions. In certain cases the mbuf can be updated there and we need to pass the new one back. That missing in dest6_input() and route6_input(). In tcp6_input() we should also update it before we call tcp_input(). In addition to that mark the mbuf NULL all the times when we return that we are done with handling the packet and no next header should be checked (IPPROTO_DONE). This will eventually allow us to assert proper behaviour and catch the above kind of errors more easily, expecting *mp to always be set. This change is extracted from a larger patch and not an exhaustive change across the entire stack yet. PR: 240135 Reported by: prabhakar.lakhera gmail.com MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354643
* It is unclear why in6_pcblookup_local() would require write accessGleb Smirnoff2019-11-111-1/+1
| | | | | | | | | | | | to the PCB hash. The function doesn't modify the hash. It always asserted write lock historically, but with epoch conversion this fails in some special cases. Reviewed by: rwatson, bz Reported-by: syzbot+0b0488ca537e20cb2429@syzkaller.appspotmail.com Notes: svn path=/head/; revision=354607
* frag6: properly handle atomic fragments according to RFCs.Bjoern A. Zeeb2019-11-081-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | RFC 8200 says: "If the fragment is a whole datagram (that is, both the Fragment Offset field and the M flag are zero), then it does not need any further reassembly and should be processed as a fully reassembled packet (i.e., updating Next Header, adjust Payload Length, removing the Fragment header, etc.). .." That means we should remove the fragment header and make all the adjustments rather than just skipping over the fragment header. The difference should be noticeable in that a properly handled atomic fragment triggering an ICMPv6 message at an upper layer (e.g. dest unreach, unreachable port) will not include the fragment header. Update the test cases to also test for an unfragmentable part. That is needed so that the next header is properly updated (not just lengths). MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22155 Notes: svn path=/head/; revision=354542
* Now with epoch synchronized PCB lookup tables we can greatly simplifyGleb Smirnoff2019-11-071-76/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | locking in udp_output() and udp6_output(). First, we select if we need read or write lock in PCB itself, we take the lock and enter network epoch. Then, we proceed for the rest of the function. In case if we need to modify PCB hash, we would take write lock on it for a short piece of code. We could exit the epoch before allocating an mbuf, but with this patch we are keeping it all the way into ip_output()/ip6_output(). Today this creates an epoch recursion, since ip_output() enters epoch itself. However, once all protocols are reviewed, ip_output() and ip6_output() would require epoch instead of entering it. Note: I'm not 100% sure that in udp6_output() the epoch is required. We don't do PCB hash lookup for a bound socket. And all branches of in6_select_src() don't require epoch, at least they lack assertions. Today inet6 address list is protected by rmlock, although it is CKLIST. AFAIU, the future plan is to protect it by network epoch. That would require epoch in in6_select_src(). Anyway, in future ip6_output() would require epoch, udp6_output() would need to enter it. Notes: svn path=/head/; revision=354479
* Since r353292 on input path we are always in network epoch, whenGleb Smirnoff2019-11-072-2/+3
| | | | | | | | | | | | | | we lookup PCBs. Thus, do not enter epoch recursively in in_pcblookup_hash() and in6_pcblookup_hash(). Same applies to tcp_ctlinput() and tcp6_ctlinput(). This leaves several sysctl(9) handlers that return PCB credentials unprotected. Add epoch enter/exit to all of them. Differential Revision: https://reviews.freebsd.org/D22197 Notes: svn path=/head/; revision=354477
* Remove unnecessary recursive epoch enter via INP_INFO_RLOCKGleb Smirnoff2019-11-071-3/+2
| | | | | | | | macro in icmp6_rip6_input(). It shall always run in the network epoch. Notes: svn path=/head/; revision=354475
* Remove unnecessary recursive epoch enter via INP_INFO_RLOCKGleb Smirnoff2019-11-071-3/+2
| | | | | | | | macro in raw input functions for IPv4 and IPv6. They shall always run in the network epoch. Notes: svn path=/head/; revision=354474
* Remove unnecessary recursive epoch enter via INP_INFO_RLOCKGleb Smirnoff2019-11-071-8/+4
| | | | | | | macro in udp6_input(). It shall always run in the network epoch. Notes: svn path=/head/; revision=354473
* netinet*: variable cleanupBjoern A. Zeeb2019-11-078-87/+115
| | | | | | | | | | | | | | | | | | In preparation for another change factor out various variable cleanups. These mainly include: (1) do not assign values to variables during declaration: this makes the code more readable and does allow for better grouping of variable declarations, (2) do not assign values to variables before need; e.g., if a variable is only used in the 2nd half of a function and we have multiple return paths before that, then do not set it before it is needed, and (3) try to avoid assigning the same value multiple times. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354462
* Widen network epoch coverage in nd6_prefix_onlink() asGleb Smirnoff2019-11-071-4/+3
| | | | | | | | | | in6ifa_ifpforlinklocal() requires the epoch. Reported by: bz Reviewed by: bz Notes: svn path=/head/; revision=354448
* In nd6_timer() enter the network epoch earlier. The defrouter_del() mayGleb Smirnoff2019-11-041-1/+1
| | | | | | | | | | call into leaf functions that require epoch. Since the function is already run in non-sleepable context, it should be safe to cover it whole with epoch. Reported by: syzcaller Notes: svn path=/head/; revision=354336
* Properly set VNET when nuking recvif from fragment queues.Bjoern A. Zeeb2019-10-251-2/+4
| | | | | | | | | | | | | | | | | | In theory the eventhandler invoke should be in the same VNET as the the current interface. We however cannot guarantee that for all cases in the future. So before checking if the fragmentation handling for this VNET is active, switch the VNET to the VNET of the interface to always get the one we want. Reviewed by: hselasky MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22153 Notes: svn path=/head/; revision=354092
* frag6: do not leak counter in error casesBjoern A. Zeeb2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | When allocating the IPv6 fragement packet queue entry we do checks against counters and if we pass we increment one of the counters to claim the spot. Right after that we have two cases (malloc and MAC) which can both fail in which case we free the entry but never released our claim on the counter. In theory this can lead to not accepting new fragments after a long time, especially if it would be MAC "refusing" them. Rather than immediately subtracting the value in the error case, only increment it after these two cases so we can no longer leak it. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354081
* frag6: prevent overwriting initial fragoff=0 packet meta-data.Bjoern A. Zeeb2019-10-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | When we receive the packet with the first fragmented part (fragoff=0) we remember the length of the unfragmentable part and the next header (and should probably also remember ECN) as meta-data on the reassembly queue. Someone replying this packet so far could change these 2 (3) values. While changing the next header seems more severe, for a full size fragmented UDP packet, for example, adding an extension header to the unfragmentable part would go unnoticed (as the framented part would be considered an exact duplicate) but make reassembly fail. So do not allow updating the meta-data after we have seen the first fragmented part anymore. The frag6_20 test case is added which failed before triggering an ICMPv6 "param prob" due to the check for each queued fragment for a max-size violation if a fragoff=0 packet was received. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354053
* frag6: handling of overlapping fragments to conform to RFC 8200Bjoern A. Zeeb2019-10-241-0/+6
| | | | | | | | | | | | | | | | While the comment was updated in r350746, the code was not. RFC8200 says that unless fragment overlaps are exact (same fragment twice) not only the current fragment but the entire reassembly queue for this packet must be silently discarded, which we now do if fragment offset and fragment length do not match. Obtained from: jtl MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16850 Notes: svn path=/head/; revision=354046
* Ensure that the flags indicating IPv4/IPv6 are not changed by failingMichael Tuexen2019-10-242-7/+37
| | | | | | | | | | | | | | | bind() calls. This would lead to inconsistent state resulting in a panic. A fix for stable/11 was committed in https://svnweb.freebsd.org/base?view=revision&revision=338986 An accelerated MFC is planned as discussed with emaste@. Reported by: syzbot+2609a378d89264ff5a42@syzkaller.appspotmail.com Obtained from: jtl@ MFC after: 1 day Sponsored by: Netflix, Inc. Notes: svn path=/head/; revision=354044
* frag6: export another counter read-only by sysctlBjoern A. Zeeb2019-10-241-0/+4
| | | | | | | | | | | | | | Similar to the system global counter also export the per-VNET counter "frag6_nfragpackets" detailing the current number of fragment packets in this VNET's reassembly queues. The read-only counter is helpful for in-VNET statistical monitoring and for test-cases. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354042