summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* Fix incompatibility in ICMPV6CTL_ND6_PRLIST sysctl, and SIOCGPRLST_IN6,hrs2013-08-061-5/+8
| | | | | SIOCGDRLST_IN6, and SIOCGNBRINFO_IN6 ioctl. These userland interfaces treat expiration times in time_second, not time_uptime.
* - Use time_uptime instead of time_second in data structures forhrs2013-08-058-42/+42
| | | | | | | | | PF_INET6 in kernel. This fixes various malfunction when the wall time clock is changed. Bump __FreeBSD_version to 1000041. - Use clock_gettime(CLOCK_MONOTONIC_FAST) in userland utilities. MFC after: 1 month
* Fix a panic in tmpaddrtimer.hrs2013-08-051-0/+2
|
* Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capablehrs2013-07-313-8/+12
| | | | | | | interfaces. This eliminates unnecessary IPv6 processing for non-IPv6 interfaces. MFC after: 3 days
* Remove the large part of struct ipsecstat. Only few fields of thisae2013-07-233-6/+6
| | | | | | | | | | | structure is used, but they already have equal fields in the struct newipsecstat, that was introduced with FAST_IPSEC and then was merged together with old ipsecstat structure. This fixes kernel stack overflow on some architectures after migration ipsecstat to PCPU counters. Reported by: Taku YAMAMOTO, Maciej Milewski
* A complete duplication of binding should be allowed if on both new andtrociny2013-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | duplicated sockets a multicast address is bound and either SO_REUSEPORT or SO_REUSEADDR is set. But actually it works for the following combinations: * SO_REUSEPORT is set for the fist socket and SO_REUSEPORT for the new; * SO_REUSEADDR is set for the fist socket and SO_REUSEADDR for the new; * SO_REUSEPORT is set for the fist socket and SO_REUSEADDR for the new; and fails for this: * SO_REUSEADDR is set for the fist socket and SO_REUSEPORT for the new. Fix the last case. PR: 179901 MFC after: 1 month
* Correct the size of allocated memory to store array of counters.ae2013-07-091-3/+4
|
* Migrate structs in6_ifstat and icmp6_ifstat to PCPU counters.ae2013-07-092-18/+39
|
* Migrate structs ip6stat, icmp6stat and rip6stat to PCPU counters.ae2013-07-097-20/+39
|
* Prepare network statistics structures for migration to PCPU counters.ae2013-07-095-119/+119
| | | | | | | | | | Use uint64_t as type for all fields of structures. Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat, in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat, pfkeystat, pim6stat, pimstat, rip6stat, udpstat. Discussed with: arch@
* In r227207, to fix the issue with possible NULL inp_socket pointertrociny2013-07-042-11/+7
| | | | | | | | | | | | | | | | | | | | | dereferencing, when checking for SO_REUSEPORT option (and SO_REUSEADDR for multicast), INP_REUSEPORT flag was introduced to cache the socket option. It was decided then that one flag would be enough to cache both SO_REUSEPORT and SO_REUSEADDR: when processing SO_REUSEADDR setsockopt(2), it was checked if it was called for a multicast address and INP_REUSEPORT was set accordingly. Unfortunately that approach does not work when setsockopt(2) is called before binding to a multicast address: the multicast check fails and INP_REUSEPORT is not set. Fix this by adding INP_REUSEADDR flag to unconditionally cache SO_REUSEADDR. PR: 179901 Submitted by: Michael Gmelin freebsd grem.de (initial version) Reviewed by: rwatson MFC after: 1 week
* - Allow ND6_IFF_AUTO_LINKLOCAL for IFT_BRIDGE. An interface with IFT_BRIDGEhrs2013-07-024-15/+51
| | | | | | | | | | | | | | | | | | | | | | | is initialized with !ND6_IFF_AUTO_LINKLOCAL && !ND6_IFF_ACCEPT_RTADV regardless of net.inet6.ip6.accept_rtadv and net.inet6.ip6.auto_linklocal. To configure an autoconfigured link-local address (RFC 4862), the following rc.conf(5) configuration can be used: ifconfig_bridge0_ipv6="inet6 auto_linklocal" - if_bridge(4) now removes IPv6 addresses on a member interface to be added when the parent interface or one of the existing member interfaces has an IPv6 address. if_bridge(4) merges each link-local scope zone which the member interfaces form respectively, so it causes address scope violation. Removal of the IPv6 addresses prevents it. - if_lagg(4) now removes IPv6 addresses on a member interfaces unconditionally. - Set reasonable flags to non-IPv6-capable interfaces. [*] Submitted by: rpaulo [*] MFC after: 1 week
* Delete the nd6 entries associated with an off-link prefixqingli2013-06-241-1/+7
| | | | | | | | if the same prefix cannot be found on an alternative interface. Reviewed by: hrs MFC after: 1 week
* Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statisticsae2013-06-203-6/+6
| | | | | | accounting. MFC after: 2 weeks
* Use PIM6STAT_INC() and MRT6STAT_INC() macros for IPv6 multicastae2013-06-191-24/+26
| | | | | | statistics accounting. MFC after: 2 weeks
* Use RIP6STAT_INC() macro for raw ip6 statistics accounting.ae2013-06-192-8/+10
| | | | MFC after: 2 weeks
* Use ICMP6STAT_INC() macro for ICMPv6 errors accounting.ae2013-06-191-17/+17
| | | | MFC after: 2 weeks
* Really fix netmask address family this time.melifaro2013-05-191-1/+1
| | | | MFC with: r250813
* Finish r85740 : Make IPv6 netmask has address family set.melifaro2013-05-191-0/+1
| | | | | | This pleases routing daemons like bird. MFC after: 2 weeks
* Finally change the mbuf to have its own fib field instead of stealingjulian2013-05-161-1/+2
| | | | | | 4 flag bits. This was supposed to happen in 8.0, and again in 2012.. MFC after: never
* Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLYtuexen2013-05-101-22/+7
| | | | | | | socket option for SCTP sockets in the same way as for UDP or TCP sockets. MFC after: 2 weeks
* Use FF02:0:0:0:0:2:FF00::/104 prefix for IPv6 Node Information Grouphrs2013-05-044-6/+53
| | | | | | | | | | | | | | | | | | Address. Although KAME implementation used FF02:0:0:0:0:2::/96 based on older versions of draft-ietf-ipngwg-icmp-name-lookup, it has been changed in RFC 4620. The kernel always joins the /104-prefixed address, and additionally does /96-prefixed one only when net.inet6.icmp6.nodeinfo_oldmcprefix=1. The default value of the sysctl is 1. ping6(8) -N flag now uses /104-prefixed one. When this flag is specified twice, it uses /96-prefixed one instead. Reviewed by: ume Based on work by: Thomas Scheffler PR: conf/174957 MFC after: 2 weeks
* Add const qualifier to the dst parameter of the ifnet if_output method.glebius2013-04-262-3/+3
|
* Remove unused variable.ae2013-04-242-3/+0
| | | | MFC after: 1 week
* Plug static llentry leak (ipv4 & ipv6 were affected).oleg2013-04-211-8/+10
| | | | | PR: kern/172985 MFC after: 1 month
* Fix build after r249543.tijl2013-04-161-1/+1
|
* Fix accounting after the r249528, also add several another counters toae2013-04-161-1/+12
| | | | the statistics.
* Use IP6S_M2MMAX macro.ae2013-04-161-3/+1
|
* Replace hardcoded numbers.ae2013-04-161-8/+12
|
* The source address selection algorithm tries to apply several rulesae2013-04-151-10/+7
| | | | | | | for the set of IPv6 addresses. Now each attempt goes into IPv6 statistics, even if given rule did not won. Change this and take into account only those rules, that won. Also add accounting for cases, when algorithm fails to select an address.
* Free memory after deleting an address policy entry.ae2013-04-121-0/+1
| | | | MFC after: 1 week
* Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.ae2013-04-0911-91/+92
| | | | MFC after: 1 week
* Clean up some unused leftover code.kevlo2013-03-221-8/+0
| | | | Pointed out by: ae
* Remove unused global variables.kevlo2013-03-221-15/+0
| | | | Reviewed by: ae, glebius
* - Use m_getcl() instead of hand allocating.glebius2013-03-154-104/+51
| | | | | | | | | - Do not calculate constant length values at run time, CTASSERT() their sanity. - Remove superfluous cleaning of mbuf fields after allocation. - Replace compat macros with function calls. Sponsored by: Nginx, Inc.
* - Use m_getcl() instead of hand allocating.glebius2013-03-154-33/+22
| | | | | | | - Use m_get()/m_gethdr() instead of macros. - Remove superfluous cleaning of mbuf fields after allocation. Sponsored by: Nginx, Inc.
* Use m_getcl() instead of hand made allocation.glebius2013-03-151-10/+5
| | | | Sponsored by: Nginx, Inc.
* Take the inpcb rlock before calculating checksum, it was accidentallyae2013-03-121-1/+1
| | | | | | | moved in r191672. Obtained from: Yandex LLC MFC after: 1 week
* Generate lle_event in the IPv6 neighbor discovery code too.np2013-01-262-0/+7
| | | | Reviewed by: bz@
* Avoid NULL dereference in nd6_storelladdr when no mbuf is provided. Itnp2013-01-251-1/+1
| | | | | | | is called this way from a couple of places in the OFED code. (toecore calls it too but that's going to change shortly). Reviewed by: bz@
* Simplify in6_setscope() function to get better performance.ae2013-01-101-46/+17
| | | | | | | | | | | | Currently we use interface indeces as zone IDs for link-local and interface-local scopes, and since we don't have any tool to configure zone IDs, there is no need to acquire the afdata lock several times per packet only to read if_index value. So, now in6_setscope reads zone IDs for interface-local, link-local and global scopes without a lock. Sponsored by: Yandex LLC MFC after: 2 weeks
* Remove unneeded variable.ae2013-01-091-6/+1
| | | | MFC after: 1 week
* Add no_prefer_iface option.ume2013-01-092-4/+7
| | | | | | | | | | It stops treating the address on the interface as special by source address selection rule even when the interface is outgoing interface. This is desired in some situation. Requested by: hrs Reviewed by: IHANet folks including hrs MFC after: 1 week
* The in6_setscope() function determines the scope zone id of an addressae2013-01-091-14/+15
| | | | | | | | | | | | and embeds it into address. Inside the kernel we keep addresses with embedded zone id only for two scopes: link-local and interface-local. For other scopes this function is nop in most cases. To reduce an overhead of locking, first check that address is capable for embedding. Also, handle the loopback address before acquire the lock. Sponsored by: Yandex LLC MFC after: 1 week
* Temporarily revert rev 244678. This is causing loopback problems withpeter2013-01-031-9/+0
| | | | the lo (loopback) interfaces.
* The SIOCSIFFLAGS ioctl handler runs if_up()/if_down() that notifyglebius2012-12-251-0/+9
| | | | | | | | | | | | | | | | | | all interested parties in case if interface flag IFF_UP has changed. However, not only SIOCSIFFLAGS can raise the flag, but SIOCAIFADDR and SIOCAIFADDR_IN6 can, too. The actual |= is done not in the protocol code, but in code of interface drivers. To fix this historical layering violation, we will check whether ifp->if_ioctl(SIOCSIFADDR) raised the IFF_UP flag, and if it did, run the if_up() handler. This fixes configuring an address under CARP control on an interface that was initially !IFF_UP. P.S. I intentionally omitted handling the IFF_SMART flag. This flag was never ever used in any driver since it was introduced, and since it means another layering violation, it should be garbage collected instead of pretended to be supported.
* When we have some address to forward (e.g. it was specified with ipfw fwd),ae2012-12-191-7/+9
| | | | | | | we should pass it as first argument into in6_selectroute_fib function to initiate new route lookup. MFC after: 1 week
* Make dst_sa initialization only when it is actually needed.ae2012-12-191-9/+12
| | | | MFC after: 1 week
* The selectroute functions does own account of EHOSTUNREACH errors,ae2012-12-191-8/+0
| | | | | | no need to do it twice. MFC after: 1 week
* Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used forae2012-12-171-1/+1
| | | | | | | | M_AUTHIPHDR. Pointy hat to: ae Reported by: Vadim Goncharov MFC after: 3 days
OpenPOWER on IntegriCloud