summaryrefslogtreecommitdiff
path: root/sys/netinet6
AgeCommit message (Collapse)Author
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@
2016-03-19Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it whenVincent Gross
checking for source availability in udp6_output(). Ok jca@ bluhm@
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2016-03-12Add checks on overlapping IPv6 sockets ownershipVincent Gross
ok mpi@ bluhm@
2016-03-07Sync no-argument function declaration and definition by adding (void).Christian Weisgerber
ok mpi@ millert@
2016-03-07Do not remove RTF_STATIC L2 entries from the routing table.Martin Pieuchot
This restore the previous behavior without looking at the reference counter of route entries. Static entries might not have a cloning route to re-create them and when their timer expires they were completly gone as found the hardway by matthieu@. ok matthieu@
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@
2016-03-03Delete all traces of SIOCSIF(ADDR|DSTADDR|NETMASK)_IN6Jeremie Courreges-Anglas
Those ioctls never made sense, IPv6 was designed right from the start with support for multiple addresses by interface. ok mikeb@ mpi@
2016-02-28Remove SIOCSIFALIFETIME_IN6 ioctl, as NetBSD did.Stefan Kempf
As described in NetBSD kern/35897 PR, the parameters this ioctl needs overlay each other in a union. The ioctl cannot have worked properly. Discovered while discussing overflow checks with mmcc@ and mpi@ The checks were part of the removed code. ok deraadt@
2016-01-21Introduce in{,6}_hasmulti(), two functions to check in the hot path ifMartin Pieuchot
an interface joined a specific multicast group. ok phessler@, visa@, dlg@
2016-01-21add a missing if_put() in a carp specific pathJonathan Gray
ok mpi@
2016-01-13Prevent a double if_put().Martin Pieuchot
ok mikeb@, bluhm@