summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6.h
AgeCommit message (Collapse)Author
2017-11-27Use a single timer for all ND6 entries.Martin Pieuchot
This prevents a use-after-free reported by Hrvoje Popovski where the timeout function was already sleeping on the NET_LOCK() when ifconfig(8) removed the enry from the table. By iterating on a global list in the timeout routine we ensure that the items are still valid when we process them. This also reduce differences with ARP. ok bluhm@, visa@
2017-11-03We are processing Router Solicitation / Advertisement messages onlyFlorian Obser
for the Source Link-layer Address Options. Merge nd6_rs_input() and nd6_ra_input() into one generic function that does just that. input & OK mpi
2017-08-09Remove knob and always do neighbor unreachable detection.Florian Obser
2017-08-09accept_rtadv doesn't do anything since some time.Florian Obser
OK mpi
2017-08-09We are no longer generating privacy addresses in theFlorian Obser
kernel. OK mpi
2017-08-08Stop running nd6_expire every second.Florian Obser
We know when pltime or vltime decrease to zero. Run nd6_expire then. Input & OK mpi, bluhm
2017-07-12Get rid of ICMPV6CTL_ND6_DRLIST and ICMPV6CTL_ND6_PRLIST sysctlsFlorian Obser
With this we can also get rid of in6_prefix and in6_defrouter. They are meaningless, the kernel no longer tracks this information. Pointed out by & OK mpi
2017-07-11Purging is at last at hand. Day of Doom is here. All that is evilFlorian Obser
shall all be cleansed. Remove sending of router solicitations and processing of router advertisements from the kernel. It's handled by slaacd(8) these days. Input & OK bluhm@, mpi@
2016-12-27Move nd6 timer initialisation to nd6_init() and call timeout_set()Alexander Bluhm
only once during init. OK mpi@
2016-11-28Remove multiple recursive splsoftnet().Martin Pieuchot
ok bluhm@
2016-11-21Assert that prelist_update() is always called at IPL_SOFTNET.Martin Pieuchot
While here use __func__ in debug strings to reduce noise when grepping.
2016-07-13store nd6 expiries in the route, not separately in the llinfo struct.David Gwynne
this makes it more consistent with arp, and makes expiries visible via route(8) get as well as ndp(8). ok mpi@ florian@
2016-06-15Kill nd6_output(), it doesn't do anything since the resolution logicMartin Pieuchot
has been moved to nd6_resolve(). ok visa@, millert@, florian@, sthen@
2016-06-08Move ND resoluton logic from nd6_output() to nd6_storelladdr() andMartin Pieuchot
rename it to nd6_resolve(). This allows us to get rid of non-Ethernet hacks by moving Ethernet specific logic in the appropriate layer. ok sthen@
2016-06-01make nd6_llinfo_settimer take seconds instead of ticks.David Gwynne
most callers are working in seconds, internally it uses seconds, and you can call timeout_add_sec as easily as timeout_add. this also fixes an issue with an nd_defrouter expire which was incorrectly scaled with ticks in a comparison. ok mpi@
2016-05-30remove code compensating for the "short" range of timeouts.David Gwynne
the nd6 code for managing expiries is never asked to handle intervals greater than what timeouts can handle, so we dont need to overcompensate. the code was also incorrect by using a long, which isnt that long on ILP32 machines. ok mpi@ millert@ benno@
2016-03-30Implement proxy ARP for ART based on mpath support.Martin Pieuchot
Since mpath is not enabled in RAMDISK, proxy ARP won't work there either. ok bluhm@
2016-03-03Kill IPv6 prefix and router renumbering ioctls.Jeremie Courreges-Anglas
Router renumbering was never supported, prefix ioctls were deprecated ~15 years ago. Move some items in netinet6/nd6.h where they are still used. ok mikeb@ mpi@
2015-12-18Convert arc4random() to arc4random_uniorm(). Diff by Matthew Martin.tb
Ensure that arc4random_uniform() doesn't loop by redefining ND6_MAX_DESYNC_FACTOR to be 512, the largest power of two smaller than the RFC-specified 600 seconds. Suggested by florian@ and deraadt@ ok florian@, sthen@ in this form, arc4random change ok djm@, tedu@
2015-11-06Change nd6_nud_hint() to no longer manipulate rt_ifp directly.Martin Pieuchot
While here remove unused argument and convert the route check to rtisvalid(9). ok bluhm@
2015-11-02Implement the list of nd6 llinfo entries with a TAILQ.Alexander Bluhm
OK millert@ mpi@
2015-11-02Prefer an existing refcounted ``ifp'' to rt_ifp when possible or use theMartin Pieuchot
interface index directly. ok bluhm@
2015-10-28Remove linkmtu and maxmtu from struct nd_ifinfo. IN6_LINKMTU can nowFlorian Obser
die and ifp->if_mtu is the one true mtu. Suggested by and OK mpi@
2015-10-25Introduce if_rtrequest() the successor of ifa_rtrequest().Martin Pieuchot
L2 resolution depends on the protocol (encoded in the route entry) and an ``ifp''. Not having to care about an ``ifa'' makes our life easier in our MP effort. Fewer dependencies between data structures implies fewer headaches. Discussed with bluhm@, ok claudio@
2015-10-24Ignore Router Advertisment's current hop limit.Martin Pieuchot
Appart from the usual inet6 axe murdering exercise to keep you fit, this allows us to get rid of a lot of layer violation due to the use of per- ifp variables to store the current hop limit. Imputs from bluhm@, ok phessler@, florian@, bluhm@
2015-08-31The return value of nd6_cache_lladdr() is never used so make it a void.Martin Pieuchot
Fewer "struct rtentry" left in the wild!
2015-08-24nd6_prefix_add() is no longer used and die.Martin Pieuchot
2015-08-24Start moving away from the global prefix list by limiting its usage toMartin Pieuchot
AUTOCONF'd addresses. This prevent the kernel from removing connected (/64) routes as soon as it configures an AUTOCONF'd address based on a RA. Tested by sebastia@, ok sthen@
2015-08-24Rework the code to decide when to perform DAD to no longer rely on theMartin Pieuchot
IN6_IFF_NODAD pseudo-flag not being set. This was just a flag for spaghetti code that should not exist in the first place. Tested by sebastia@, ok sthen@
2015-08-18Call rtfree(9) when we no longer need the route entry rather thanMartin Pieuchot
decrementing rt_refcnt just after rtrequest1(9). While here reduce the differences with rt_ifa_add(9). There's still an ambiguity about rtrequest1(9)'s return value, but bluhm@ will address that in a different diff. Discussed with and ok bluhm@
2015-07-18Merge two identical chunks to add new prefixes to the global dataMartin Pieuchot
structures into a function. ok florian@
2015-07-16Properly layer Router Solicitation code.Martin Pieuchot
Tweak and ok florian@
2015-07-09Remove unused arguments and the associated code from nd6_nud_hint().Martin Pieuchot
ok claudio@
2014-11-20Rework the handling of interfaces and IPv6 addresses for local delivery.Martin Pieuchot
- Unicast packets sent to any local address will have their interface set to loobpack. - In order to differentiate traffic from interfaces having identical link-local addresses, provide the scoped addresses to pf(4). - Update the icmp6 state lookup logic to match scoped MLL addresses. - Remove a shortcut in ip6_input() that bypasses pf and always look for an RTF_LOCAL route. Packets sent to multicast addresses still retain their original interface due to the fact that local multicast packet delivering does not use if_output. This makes ping6 to link-local addresses work even with pf enabled and "set skip" on loopbacks, reported by Pieter Verberne. Debugged, analysed and tested with mikeb@. ok mikeb@, henning@, sthen@
2014-11-10Do not pass an ifa pointer when we already have a DAD descriptor.Martin Pieuchot
Tweaks and ok florian@
2014-08-25Move sending of router solicitations to the kernel; receiving andFlorian Obser
processing of router advertisements was already in the kernel. With this rtsol{,d}(8) is no longer necessary. The kernel starts sending solicitations with # ifconfig $IF inet6 autoconf or inet6 autoconf in /etc/hostname.$IF. input stsp@ much help & OK mpi@ tweaks & OK bluhm@
2014-07-11move IPv6 prefix adding from workq to taskq; as a happy benefit, weBret Lambert
can delete 2 dozen or so lines that check to see if we've queued up a prefix addition multiple times. ok stsp@
2014-05-07Kill the {nd6_,}useloopback buttons, using the loopback interface forMartin Pieuchot
local traffic is not optional. ok mikeb@, stsp@, jca@
2014-01-07Propagate an rdomain number to the nd6_lookup independently fromMike Belopuhov
the ifp pointer which can be NULL. This prevents a crash reported by David Hill <dhill at mindcry ! org>. OK bluhm
2013-10-25More _KERNEL namespace cleanup, just in case something out thereTheo de Raadt
includes this.
2013-08-28Remove unused argument from *rtrequest()Martin Pieuchot
ok krw@, mikeb@
2013-08-26No one uses the obsolete IPv6 ioctls SIOCGDRLST_IN6, SIOCGPRLST_IN6,Alexander Bluhm
OSIOCGIFINFO_IN6 anymore. Remove them together with the structs in6_drlist, in6_oprlist, in6_prlist, in6_ondireq and the kernel implementation. OK mikeb@ henning@
2013-08-11To control the lifetime of IPv6 addresses, prefixes and defaultAlexander Bluhm
routers, the kernel and ndp use a bunch of expire fields. Before they were int or u_long, convert expire to time_t in all structs. Move vltime and pltime to u_int32_t everywhere. Sort struct fields by size. Struct inet6_ndpr_msghdr is not used at all, so remove it. Binary compatibility of rtsold and ndp break with this change as rtsold uses in6_drlist and ndp uses in6_defrouter and in6_prefix to interact with the kernel. OK mpi@
2013-07-01Do not access queue fields directly, use FOREACH() macro instead.Alexander Bluhm
No binary change. OK mikeb@ mpi@
2013-03-11Remove unused code manipulating a default interface and its index,Martin Pieuchot
This is a leftover from the on-link assumption behavior removal, which has been deprecated by RFC4861 anyway. ok mikeb@, bluhm@, florian@
2012-02-14typo in comment.Stuart Henderson
2011-04-03fix typos in commentsStefan Sperling
ok deraadt henning sthen thib (though thib says he can't spell)
2010-04-06Simple implementation of RFC4941, "Privacy Extensions for StatelessStefan Sperling
Address Autoconfiguration in IPv6". For those among us who are paranoid about broadcasting their MAC address to the IPv6 internet. Man page help from jmc, testing by weerd, arc4random API hints from djm. ok deraadt, claudio
2008-06-11From KAME, allow adjustable limits on NDP entries and discovered routes.Ryan Thomas McBride
ok mpf naddy
2003-07-08unifdef -U__otherBSD__Jun-ichiro itojun Hagino