summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-12-051-2/+2
|\
| * MFC r286227, r286443:jch2016-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r286227: Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: - The existing TCP INP_INFO lock continues to protect the global inpcb list stability during full list traversal (e.g. tcp_pcblist()). - A new INP_LIST lock protects inpcb list actual modifications (inp allocation and free) and inpcb global counters. It allows to use TCP INP_INFO_RLOCK lock in critical paths (e.g. tcp_input()) and INP_INFO_WLOCK only in occasional operations that walk all connections. PR: 183659 Differential Revision: https://reviews.freebsd.org/D2599 Reviewed by: jhb, adrian Tested by: adrian, nitroboost-gmail.com Sponsored by: Verisign, Inc. r286443: Fix a kernel assertion issue introduced with r286227: Avoid too strict INP_INFO_RLOCK_ASSERT checks due to tcp_notify() being called from in6_pcbnotify(). Reported by: Larry Rosenman <ler@lerctr.org> Submitted by: markj, jch
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-08-086-134/+303
|\ \ | |/
| * MFC r299829sbruno2016-07-281-1/+3
| | | | | | | | Use Node Information flag names instead of hard-coding their values.
| * MFC r296063 r297397 r299213sbruno2016-07-285-133/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 296063: Lock the NDP default router list and count defrouter references. This addresses a number of race conditions that can cause crashes as a result of unsynchronized access to the list. 297397 Modify nd6_llinfo_timer() to acquire the nd6 lock before the LLE lock. When expiring a neighbour cache entry we may need to look up the associated default router, which requires the nd6 read lock. To avoid an LOR, the nd6 lock should be acquired first. 299213 Clean up callers of nd6_prelist_add(). nd6_prelist_add() sets *newp if and only if it is successful, so there's no need for code that handles the case where the return value is 0 and *newp == NULL. Fix some style bugs in nd6_prelist_add() while here. Submitted by: Jason Wolfe <j@nitrology.com>
* | MFC r298398:Luiz Otavio O Souza2016-05-112-4/+4
| | | | | | | | | | | | Constify mbuf pointer for IPSEC functions where mbuf isn't modified. TAG: IPSEC-HEAD
* | MFC r288418:Luiz Otavio O Souza2016-05-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take extra reference to security policy before calling crypto_dispatch(). Currently we perform crypto requests for IPSEC synchronous for most of crypto providers (software, aesni) and only VIA padlock calls crypto callback asynchronous. In synchronous mode it is possible, that security policy will be removed during the processing crypto request. And crypto callback will release the last reference to SP. Then upon return into ipsec[46]_process_packet() IPSECREQUEST_UNLOCK() will be called to already freed request. To prevent this we will take extra reference to SP. PR: 201876 Sponsored by: Yandex LLC TAG: IPSEC-HEAD
* | MFC r282047:Luiz Otavio O Souza2016-05-111-3/+1
| | | | | | | | | | | | | | | | | | Remove now unneded KEY_FREESP() for case when ipsec[46]_process_packet() returns EJUSTRETURN. Sponsored by: Yandex LLC TAG: IPSEC-HEAD
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-05-095-68/+43
|\ \ | |/
| * MFC r295583, r295584, r295729, r295730:markj2016-05-055-15/+15
| | | | | | | | | | | | | | NDP code cleanup changes. MFC r295732: Fix an IPv6 DAD reference count leak.
| * MFC r295575, r295576, r295578, r295579, r295580:markj2016-05-033-54/+29
| | | | | | | | Various NDP cleanups. No functional change intended.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-04-111-10/+18
|\ \ | |/
| * MFC r296984:ae2016-03-311-10/+18
| | | | | | | | | | Change in6_selectsrc() to allow usage of non-local IPv6 addresses in IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-02-281-25/+26
|\ \ | |/
| * MFC r295549:tuexen2016-02-251-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loopback addresses are 127.0.0.0/8, not 127.0.0.1/32. MFC r295668: Improve the teardown of the SCTP stack. MFC r295670: Whitespace changes. MFC r295708: Address a warning reported by D5245 / PVS. MFC r295709: Code cleanup which will silence a warning in PVS / D5245. MFC r295710: Add protection code for issues reported by PVS / D5245. MFC r295771: Fix reporting of mapped addressed in getpeername() and getsockname() for IPv6 SCTP sockets. This bugs were found because of an issue reported by PVS / D5245. MFC r295772: Add some protection code. MFC r295773: Add protection code. MFC r295805: Use the SCTP level pointer, not the interface level. MFC r295929: Don't leak an address in an error path. Approved by: re (marius)
* | Merge remote-tracking branch 'origin/stable/10' into develLuiz Otavio O Souza2016-02-091-1/+1
|\ \ | |/
| * MFC r292601,292654:bz2016-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since r256624 (head) we have been leaking routing table allocations on vnet enabled jail shutdown. Call the provided cleanup routines for IP versions 4 and 6 to plug these leaks. Sponsored by: The FreeBSD Foundation Reviewed by: gnn Differential Revision:https://reviews.freebsd.org/D4530 Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-252-7/+4
|\ \ | |/
| * MFC 292953:bz2016-01-211-2/+2
| | | | | | | | | | | | This code is not in modules that need KPI stability so no need to use the wrapper functions as used in r252511 (head). We can directly use the locking macros.
| * MFC r291904:tuexen2016-01-171-1/+1
| | | | | | | | | | | | | | | | | | Fix the allocation of outgoing streams: * When processing a cookie, use the number of streams announced in the INIT-ACK. * When sending an INIT-ACK for an existing association, use the value from the association, not from the end-point.
| * MFC r285877:tuexen2016-01-161-4/+1
| | | | | | | | | | | | Move including netinet/icmp6.h around to avoid a problem when including netinet/icmp6.h and net/netmap.h. Both use ni_flags... This allows to build multistack with SCTP support.
* | Add patch from FreeBSD PR 206231. Ticket #5748Chris Buechler2016-01-221-0/+1
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-141-1/+4
|\ \ | |/
| * o Fix SCTP ICMPv6 error message vulnerability. [SA-16:01.sctp]glebius2016-01-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | o Fix Linux compatibility layer incorrect futex handling. [SA-16:03.linux] o Fix Linux compatibility layer setgroups(2) system call. [SA-16:04.linux] o Fix TCP MD5 signature denial of service. [SA-16:05.tcp] o Fix insecure default bsnmpd.conf permissions. [SA-16:06.bsnmpd] Security: FreeBSD-SA-16:01.sctp, CVE-2016-1879 Security: FreeBSD-SA-16:03.linux, CVE-2016-1880 Security: FreeBSD-SA-16:04.linux, CVE-2016-1881 Security: FreeBSD-SA-16:05.tcp, CVE-2016-1882 Security: FreeBSD-SA-16:06.bsnmpd, CVE-2015-5677
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-131-0/+1
|\ \ | |/
| * MFH r292836:wollman2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | in6_if2idlen: treat bridge(4) interfaces like other Ethernet interfaces bridge(4) interfaces have an if_type of IFT_BRIDGE, rather than IFT_ETHER, even though they only support Ethernet-style links. This caused in6_if2idlen to emit an "unknown link type (209)" warning to the console every time it was called. Add IFT_BRIDGE to the case statement in the appropriate place, indicating that it uses the same IPv6 address format as other Ethernet-like interfaces.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-221-0/+2
|\ \ | |/
| * MFC r292219:kp2015-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | inet6: Do not assume every interface has ip6 enabled. Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words, ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is updated. pfsync interfaces will never have ip6 support, because it's explicitly disabled in in6_domifattach(). PR: 205194
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-101-0/+10
|\ \ | |/
| * Fix typo in r291986.ae2015-12-081-1/+1
| | | | | | | | (this is derect commit to stable/10)
| * MFC r291578:ae2015-12-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send a reply to the MLDv2 General Query. In case when router has a lot of multicast groups, the reply can take several packets due to MTU limitation. Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number of packets we send in one shot. Then we recalculate the timer value and schedule the remaining packets for sending. The problem is that when we call mld_v2_dispatch_general_query() to send remaining packets, we queue new reply in the same mbuf queue. And when number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless reply of MLDv2 reports. To fix this, add the check for remaining packets in the queue. PR: 204831
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-112-19/+47
|\ \ | |/
| * MFC r288600:hrs2015-11-042-19/+47
| | | | | | | | | | | | | | | | | | | | | | | | - Schedule DAD for IN6_IFF_TENTATIVE addresses in nd6_timer(). This catches cases that DAD probes cannot be sent because of IFF_UP && !IFF_DRV_RUNNING. - nd6_dad_starttimer() now calls nd6_dad_ns_output(), instead of calling it before nd6_dad_starttimer(). - Do not release an entry in dadq when a duplicate entry is being added.
* | MFC r282046:Luiz Otavio O Souza2015-10-202-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix possible use after free due to security policy deletion. When we are passing mbuf to IPSec processing via ipsec[46]_process_packet(), we hold one reference to security policy and release it just after return from this function. But IPSec processing can be deffered and when we release reference to security policy after ipsec[46]_process_packet(), user can delete this security policy from SPDB. And when IPSec processing will be done, xform's callback function will do access to already freed memory. To fix this move KEY_FREESP() into callback function. Now IPSec code will release reference to SP after processing will be finished. Differential Revision: https://reviews.freebsd.org/D2324 No objections from: #network Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275716:Luiz Otavio O Souza2015-10-202-3/+0
| | | | | | | | | | | | | | | | | | | | | | Do not count security policy violation twice. ipsec*_in_reject() do this by their own. Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275715:Luiz Otavio O Souza2015-10-202-49/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ipsec6_in_reject() to simplify ip6_ipsec_fwd() and ip6_ipsec_input(). ipsec6_in_reject() does the same things, also it counts policy violation errors. Do IPSEC check in the ip6_forward() after addresses checks. Also use ip6_ipsec_fwd() to make code similar to IPv4 implementation. Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275710:Luiz Otavio O Souza2015-10-204-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove flag/flags argument from the following functions: ipsec_getpolicybyaddr() ipsec4_checkpolicy() ip_ipsec_output() ip6_ipsec_output() The only flag used here was IP_FORWARDING. Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275704:Luiz Otavio O Souza2015-10-201-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move ip_ipsec_fwd() from ip_input() into ip_forward(). Remove check for presence PACKET_TAG_IPSEC_IN_DONE mbuf tag from ip_ipsec_fwd(). PACKET_TAG_IPSEC_IN_DONE tag means that packet is already handled by IPSEC code. This means that before IPSEC processing it was destined to our address and security policy was checked in the ip_ipsec_input(). After IPSEC processing packet has new IP addresses and destination address isn't our own. So, anyway we can't check security policy from the mbuf tag, because it corresponds to different addresses. We should check security policy that corresponds to packet attributes in both cases - when it has a mbuf tag and when it has not. Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275703:Luiz Otavio O Souza2015-10-201-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove PACKET_TAG_IPSEC_IN_DONE mbuf tag lookup and usage of its security policy. The changed block of code in ip*_ipsec_input() is called when packet has ESP/AH header. Presence of PACKET_TAG_IPSEC_IN_DONE mbuf tag in the same time means that packet was already handled by IPSEC and reinjected in the netisr, and it has another ESP/AH headers (encrypted twice?). Since it was already processed by IPSEC code, the AH/ESP headers was already stripped (and probably outer IP header was stripped too) and security policy from the tdb_ident was applied to those headers. It is incorrect to apply this security policy to current headers. Also make ip_ipsec_input() prototype similar to ip6_ipsec_input(). Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r275702:Luiz Otavio O Souza2015-10-201-47/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove check for presence of PACKET_TAG_IPSEC_PENDING_TDB and PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED mbuf tags. They aren't used in FreeBSD. Instead check presence of PACKET_TAG_IPSEC_OUT_DONE mbuf tag. If it is found, bypass security policy lookup as described in the comment. PACKET_TAG_IPSEC_OUT_DONE tag added to mbuf when IPSEC code finishes ESP/AH processing. Since it was already finished, this means the security policy placed in the tdb_ident was already checked. And there is no reason to check it again here. Obtained from: Yandex LLC Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | MFC r272299:Luiz Otavio O Souza2015-10-201-11/+4
| | | | | | | | | | | | | | | | | | | | Remove redundant call to ipsec_getpolicybyaddr(). ipsec_hdrsiz() will call it internally. Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
* | Revert IPSEC patches.Luiz Otavio O Souza2015-10-202-57/+47
| | | | | | | | | | | | | | | | | | Revert "Importing pfSense patch IPSEC_sysctl.RELENG_10.diff" This reverts commit 1a5bcc816de96758225aa0a4d2b5ddc7b88b6b58. TAG: IPSEC-HEAD Issue: #4841
* | Merge branch 'stable/10' into develRenato Botelho2015-10-071-1/+1
|\ \ | |/
| * Remove extra space introduced in r287734. This is a stable/10 only fixgarga2015-09-221-1/+1
| | | | | | | | | | | | | | since original commit (r287094) is correct. Approved by: loos Sponsored by: Rubicon Communications (Netgate)
* | Merge branch 'stable/10' into develRenato Botelho2015-09-225-142/+47
|\ \ | |/
| * MFC 287094:hrs2015-09-134-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Deprecate IN6_IFF_NODAD. It was used to prevent DAD on a loopback interface but in6if_do_dad() already had a check for IFF_LOOPBACK. - Remove in6if_do_dad() check in in6_broadcast_ifa(). An address which needs DAD always has IN6_IFF_TENTATIVE there. - in6if_do_dad() now returns EAGAIN when the interface is not ready since DAD callout handler ignores such an interface. - In DAD callout handler, mark an address as IN6_IFF_TENTATIVE when the interface has ND6_IFF_IFDISABLED. And Do IFF_UP and IFF_DRV_RUNNING check consistently when DAD is required. - draft-ietf-6man-enhanced-dad is now published as RFC 7527. - Fix some typos.
| * MFC 287095, 287610, 287611, 287617:hrs2015-09-133-114/+22
| | | | | | | | Remove obsolete API (SIOCGDRLST_IN6 and SIOCGPRLST_IN6) support.
| * MFC 287609:hrs2015-09-131-4/+6
| | | | | | | | Do not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD.
| * MFC 287608:hrs2015-09-132-6/+0
| | | | | | | | Remove IN6_IFF_NOPFX. This flag was no longer used.
* | Importing pfSense patch IPSEC_sysctl.RELENG_10.diffRenato Botelho2015-08-172-47/+57
| |
OpenPOWER on IntegriCloud