summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
Commit message (Collapse)AuthorAgeFilesLines
* 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
* In additional to the tailq of IPv6 addresses add the hash table.ae2012-12-153-10/+40
| | | | | | | | | | For now use 256 buckets and fnv_hash function. Use xor'ed 32-bit s6_addr32 parts of in6_addr structure as a hash key. Update in6_localip and in6_is_addr_deprecated to use hash table for fastest lookup. Sponsored by: Yandex LLC Discussed with: dwmalone, glebius, bz
* Fix problem in r238990. The LLE_LINKED flag should be tested prior toglebius2012-12-131-2/+8
| | | | | | | | | entering llentry_free(), and in case if we lose the race, we should simply perform LLE_FREE_LOCKED(). Otherwise, if the race is lost by the thread performing arptimer(), it will remove two references from the lle instead of one. Reported by: Ian FREISLICH <ianf clue.co.za>
* - Move definition of V_deembed_scopeid to scope6_var.h.hrs2012-12-053-0/+16
| | | | | | - Deembed scope id in L3 address in in6_lltable_dump(). - Simplify scope id recovery in rtsock routines. - Remove embedded scope id handling in ndp(8) and route(8) completely.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-0510-51/+51
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Remove opt_inet.h, it isn't required here.ae2012-11-201-1/+0
| | | | MFC after: 1 week
* Check if an extracted zoneid is equal to the non-zero sin6_scope_id only whenhrs2012-11-181-6/+8
| | | | it is link-local or MC interface-local.
* Add support for SCTP/UDP/IPV6.tuexen2012-11-172-2/+8
| | | | | | | This completes the support of http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-udp-encaps MFC after: 1 week
* Reduce the overhead of locking, use IF_AFDATA_RLOCK() when we are doingae2012-11-165-18/+18
| | | | | | | simple lookups. Sponsored by: Yandex LLC MFC after: 1 week
* if_afdata lock was converted from mutex to rwlock a long ago, so we canae2012-11-141-14/+15
| | | | | | | replace IF_AFDATA_LOCK() macro depending to the access type. Sponsored by: Yandex LLC MFC after: 1 week
* SCOPE6_LOCK protects V_sid_default, no need to acquire it withoutae2012-11-141-9/+0
| | | | | | | any access to V_sid_default. Sponsored by: Yandex LLC MFC after: 1 week
* zoneid has unsigned type.ae2012-11-141-1/+1
| | | | MFC after: 1 week
* Use consistent style.obrien2012-11-131-3/+2
|
* Remove the recently added sysctl variable net.pfil.forward.ae2012-11-025-13/+12
| | | | | | | | | Instead, add protocol specific mbuf flags M_IP_NEXTHOP and M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup only when this flag is set. Suggested by: andre
* Whitespace changes due to upstream integration of SCTP changes in thetuexen2012-10-291-14/+8
| | | | FreeBSD code base.
* Remove the IPFIREWALL_FORWARD kernel option and make possible to turnae2012-10-254-18/+10
| | | | | | | | | on the related functionality in the runtime via the sysctl variable net.pfil.forward. It is turned off by default. Sponsored by: Yandex LLC Discussed with: net@ MFC after: 2 weeks
* Remove __P.delphij2012-10-2218-285/+285
| | | | | | Submitted by: kevlo Reviewed by: md5(1) MFC after: 2 months
* Switch the entire IPv4 stack to keep the IP packet headerglebius2012-10-221-6/+0
| | | | | | | | | | | | | | | | | | | | | | | in network byte order. Any host byte order processing is done in local variables and host byte order values are never[1] written to a packet. After this change a packet processed by the stack isn't modified at all[2] except for TTL. After this change a network stack hacker doesn't need to scratch his head trying to figure out what is the byte order at the given place in the stack. [1] One exception still remains. The raw sockets convert host byte order before pass a packet to an application. Probably this would remain for ages for compatibility. [2] The ip_input() still subtructs header len from ip->ip_len, but this is planned to be fixed soon. Reviewed by: luigi, Maxim Dounin <mdounin mdounin.ru> Tested by: ray, Olivier Cochard-Labbe <olivier cochard.me>
OpenPOWER on IntegriCloud