summaryrefslogtreecommitdiff
path: root/sys/netinet6
AgeCommit message (Collapse)Author
2016-08-08Execute address hooks in the update case.Martin Pieuchot
This matches what IPv4 is doing and unbreak carp(4) when the same address is set twice, for example when running netstart(8) multiple times. Issue reported by and fix from Simon Mages.
2016-08-04Commit in6_selectsrc() split again, with missing assignment fixed.Vincent Gross
2016-07-22Revert in_selectsrc() refactoring, it breaks IPv6.Martin Pieuchot
Reported by Heiko on bugs@. ok stsp@, claudio@
2016-07-20Split in6_selectsrc() into a low-level part and a pcb-level part, andVincent Gross
convert in_selectsrc() prototype to match. Ok bluhm@ mpi@.
2016-07-19protect a pf specific function with the correct #if. Fixes ramdisk building.Peter Hessler
(we got lucky before, because the variable that used to be checked was always available) OK bluhm@
2016-07-19In ip6_input() use a shortcut to detect our own address if the pfAlexander Bluhm
state key is linked to a socket inp. OK mpi@ henning@
2016-07-19Use a flag to indicate that a packet has been received on an IPv6Martin Pieuchot
anycast address. This will allow us to split ip6_input() in two parts using a queue in the middle. ok jca@, florian@, bluhm@
2016-07-18Kill the rtableid variable in ip6_input(). It does not make senseAlexander Bluhm
to store a field in an extra variable that is only accessed twice. OK mpi@
2016-07-14Drop received packets with an IPv4-compatible address as source orMartin Pieuchot
destination as per RFC4213. We're not in 1999 anymore, what was earlier a "stronger check than RFC1933" is now a best practice. This matches the behavior of the reject (R) routes added by default by netstart(8). ok jca@, florian@, claudio@, bluhm@
2016-07-13Introduce RTF_MULTICAST and flag corresponding IPv6 routes as suchMartin Pieuchot
instead of abusing RTF_CLONING. Fix a leak reporeted by Aaron Riekenberg on misc@, ok sthen@
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-07-06Move Hop-by-Hop processing into its own function ip6_hbhchcheck().Martin Pieuchot
This function will help splitting the IPv6 input path in two, in order to run the first part without KERNEL_LOCK() held. Tested by Hrvoje Popovski, ok bluhm@
2016-07-05Expand IN6_IFF_NOTREADY, ok bluhm@Martin Pieuchot
2016-07-05Do not use ``rt_addr'' in in{6,}_selectsrc() it doesn't work with magicMartin Pieuchot
addresses set on p2p interfaces. Found the hardway by naddy@
2016-07-01Unbreak getsockopt(IPV6_MINHOPCOUNT)Jeremie Courreges-Anglas
ok bluhm@
2016-06-30Use ``rt_addr'' rather than ``rt_ifa'' to get the source addressMartin Pieuchot
corresponding to a route. ok florian@ on a previous version, input and ok bluhm@
2016-06-30Restore the automagically added /64 route on p2p interfaces in order toMartin Pieuchot
send traffic to link-local addresses without default route. Fix a regression reported by Michael Lechtermann, ok stsp@, sthen@
2016-06-27Kill outdated comment. Reading the code is enough.Jeremie Courreges-Anglas
ok sthen@ bluhm@
2016-06-27Implement IPV6_MINHOPCOUNT support.Jeremie Courreges-Anglas
Useful to implement GTSM support in daemons such as bgpd(8). Diff from 2013 revived by renato@. Input from bluhm@, ok bluhm@ deraadt@
2016-06-15With the introduction of ip6_output_ipsec_lookup() we didn't exit theFlorian Obser
loop when we worked out that no IPsec is needed which led to a NULL de-ref on the next iteration. Fix this by making the code more similar to the IPv4 case. Found the hard way by me, OK mpi@
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-13Move the ioctl(2) logic of in{,6}_control() into two new functionsMartin Pieuchot
in{,6}_ioctl() that do not deal with sockets. This will allow to automagically configure interface addresses in the kernel without too many layer violations. Required by upcoming umb(4).
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-06Move nd6_output()'s "short-circuiting" for non-lladdr interface types earlier.Stuart Henderson
nd6.c's nd6_output() decides whether link-layer address resolution is needed before sending the packet. Up to r1.178 packets for many non-ethernet interface types were sent directly without checking the gateway or determining if link- layer address resolution was needed. In r1.179 this was changed to skip some decision making for gif(4) but moved the short-circuiting for those interface types to *after* the gateway was checked. In my v6 pppoe setup, rt_checkgate is returning EHOSTUNREACH so this move prevented it from working. ok mpi@
2016-06-03measure nd expiry times against time_uptime, not time_second.David Gwynne
time_second can be jumped by clock changes, while time_uptime will always progress monotonically. it is still translated to time_seconds for export to userland though. ok mpi@
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-06-01Kill sysctl net.inet6.ip6.rr_pruneJeremie Courreges-Anglas
We don't support Router Renumbering and there are no plans to change that. ok mpi@
2016-05-31Stop creating and inserting a route entry for ARP and ND automagically.Martin Pieuchot
Callers MUST do a route lookup before sending a packet. Tested by Hrvoje Popovski, ok visa@, bluhm@
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-05-19Remove sysctl net.inet6.ip6.v6onlyJeremie Courreges-Anglas
This sysctl is a no-op, read-only since it was introduced. There are no plans to support IPv4-mapped addresses on OpenBSD, thus this sysctl is meaningless. Noticed by djm@, ok claudio@ mpi@ sthen@ henning@
2016-05-19Do not check if source address is available when the UDP6 socket is boundVincent Gross
to [::]. We should be able to send from a socket bound to [::] while using sockets bound to specified addresses for reception. Spotted with regress/usr.sbin/syslogd/args-client-bind-only6.pl test case. "makes sense to me" millert@, ok benno@, ok bluhm@
2016-05-17Completely skip link-layer address resolution and NUD on gif(4).Martin Pieuchot
Tested by naddy@
2016-05-07Remove duplicate check.Martin Pieuchot
ok sthen@, visa@
2016-05-02Simplify life for routing table implementations by requiring that rtable_walkJonathan Matthew
callbacks return EAGAIN if they modify the routing table. While we're here, simplify life for rtable_walk callers by moving the loop that restarts the walk on EAGAIN into rtable_walk itself. Flushing cloned routes on interface state changes becomes a bit more inefficient, but this can be improved later. ok mpi@ dlg@
2016-05-02Merge two identical code paths.Martin Pieuchot
ok benno@, visa@
2016-04-29Do not allow to change the routing table of a bound socket. ThisAlexander Bluhm
is not intended and will behave unexpectedly if the address is already used in another domain. It did not work anyway, as the PCB ended in the wrong hash bucket after changing the rtable. Fail with EBUSY if the socket is already bound and rehash the PCB if its rtable changes. input claudio@; OK mpi@
2016-04-27factor out ipsec into ip6_output_ipsec_{lookup,send}(); ok mpi@, naddy@Markus Friedl
2016-04-27Remove unused arguments from rt_checkgate().Martin Pieuchot
Since the rtalloc(9) rewrite no route lookup is done in this function so there's no need for a destination or a rtable ID.
2016-04-19Instead of freeing a cached RTF_MPATH route after using it, free itMartin Pieuchot
when the next packet needs to be forwarded, just like if the route was invalid. ok mikeb@, claudio@
2016-04-11Rename in_pcblookup() to in_pcblookup_local() and change its prototypeVincent Gross
to get rid of the now useless foreign address and ports parameters. ok mpi@
2016-04-11This code chunk has been disabled since its import, and what is does isVincent Gross
quite unsafe. Juste delete it. Ok mpi@
2016-04-11Search in the correct routing table if NPF is not defined.Martin Pieuchot
ok jca@, phessler@, mikeb@
2016-04-05Move reserved port checks from in(6)_pcbaddrisavail() to in_pcbbind().Vincent Gross
Kill old comments while at it. Ok mpi@ bluhm@
2016-03-31Don't forget to initialize scope_id. This fixes semarie@ and sthen@'sVincent Gross
regressions with dhcpcd. Ok sthen@
2016-03-30Use in6_pcbhashlookup() in in6_pcbconnect(). We don't need in_pcblookup()Vincent Gross
broad search and in_pcbconnect() already uses in_pcbhashlookup(). ok bluhm@ mpi@ jca@
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-29remove dead stores and unused variablesCharles Longeau
ok bluhm@ jca@
2016-03-23Merge in_pcbbind() and in6_pcbbind(), and change every call toVincent Gross
in6_pcbbind() into in_pcbbind(). Ok jca@ mpi@
2016-03-21Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it whenVincent Gross
checking for source availability in udp6_output(); This time with all the files. Ok jca@ bluhm@
2016-03-20Revert, missing decl for in6_pcbaddrisavail() breaks kernel build.Jeremie Courreges-Anglas
Spotted by deraadt@