summaryrefslogtreecommitdiff
path: root/sys/netinet6
AgeCommit message (Collapse)Author
2015-11-11Store the index of the lo0 interface instead of a pointer to itsMartin Pieuchot
descriptor. Allow to get rid of two if_ref() in the output paths. ok dlg@
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-03Remove dead assignments.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok bluhm@ mpi@
2015-11-03Disable TCP/UDP TX hardware checksumming if an IPv4 packet containsChristian Weisgerber
IP options or if an IPv6 packet contains header extensions. Required by cnmac(4) and a sensible precautionary measure in general. ok visa@, mikeb@
2015-11-02Retire ARP load-balacing, thanks for all the fish!Martin Pieuchot
One of the keys of our MP work relies on making OpenBSD's kernel simpler! In this case turning ARP processing MP-safe is quite complicated due to the way carp(4) is hooked in arpinput() and nowadays you'd better run kitchensinkd(9) anyway :) ok bluhm@, claudio@, reyk@
2015-11-02typo in commentStuart Henderson
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-11-02Stop using rt_ifp.Martin Pieuchot
ok bluhm@
2015-11-01Replace the nd6 llinfo malloc(9) with pool_get(9) like arp does.Alexander Bluhm
OK mpi@
2015-11-01Compare nd6 llinfo pointer with NULL. No binary change.Alexander Bluhm
OK mpi@
2015-10-30Rename rtrequest1() to rtrequest().Alexander Bluhm
OK mpi@
2015-10-29a few redundant tests can be deleted now that switch cases are only forTed Unangst
a single value
2015-10-29oops, one firebomb went off course. put back some code that's still used.Ted Unangst
2015-10-29RFC 2292 API support was removed 9 years ago, but left in a binary compatTed Unangst
ABI form for the sake of existing programs. no programs from that era have been able to run for quite some time. Kill it all. ok deraadt florian millert mpi (I believe this is my first IPv6 diff. Future, here I come!)
2015-10-29Kill a comment saying that rt_ifp may not be the same as ifp, that's noMartin Pieuchot
longer true.
2015-10-28Add a missing splx for a return path introduced in rev 1.163Jonathan Gray
ok mpi@ 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-27Use rt_ifidx rather than rt_ifp.Martin Pieuchot
ok bluhm@
2015-10-25Put some comments in how nd6_rs_attach() works.Florian Obser
Requested by stsp
2015-10-25do not expose nd6 randomid's to userland via ioctl.Theo de Raadt
ok claudio mpi florian
2015-10-25Trivial rt_ifp->if_index -> rt_ifidx conversions.Martin Pieuchot
2015-10-25Remove IPV6_NEXTHOP implementation. Source routing is considered to beFlorian Obser
a bad idea these days. kill it mpi@ general agreement in the network hackers room at u2k15
2015-10-25Use the "modern" way to check if a route entry correspond to a localMartin Pieuchot
address. Fix a regression introduced when removing the lo0 hack. ok florian@
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-24Convert to rt_ifidx.Martin Pieuchot
ok bluhm@
2015-10-24Convert to rt_ifidx.Martin Pieuchot
ok bluhm@
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-10-24Convert some if_ref() to if_get().Martin Pieuchot
ok claudio@
2015-10-23replace pointer arithmetic and casts with offsetofJonathan Gray
ok mpi@ bluhm@
2015-10-22Make sure that the address matching the key (destination) of a routeMartin Pieuchot
entry is attached to this entry. ok phessler@, bluhm@
2015-10-22Use rt_ifp instead of rt_ifa->ifa_ifp.Martin Pieuchot
ok bluhm@
2015-10-22Inspired by satosin(), use inline functions to convert sockaddr dl.Alexander Bluhm
Instead of casts they check wether the incoming object has the expected type. So introduce satosdl() and sdltosa() in the kernel. OK mpi@
2015-10-22Use rt_ifp as intended.Martin Pieuchot
During s2k15 we fixed this ugly 20+ years loopback hack of having a rt_ifp different than rt_ifa->ifa_ifp. ok millert@, bluhm@
2015-10-22Kill dead code missed in per-ifp counter removal.Martin Pieuchot
ok millert@, bluhm@
2015-10-20At guenther's suggestion replace dnssocket() with a SOCK_DNS flag onTheo de Raadt
socket(). Without pledge, all other socket behaviours become permitted, except this one case: connect/send* only works to *:53. In pledge mode, a very few are further restricted. Some backwards compatibility for the dnssocket/dnsconnect calls will remain in the tree temporarily so that people can build through the transition. ok tedu guenther semarie
2015-10-19Stop checking for RTF_UP directly, call rtisvalid(9) instead.Martin Pieuchot
While here add two missing ``rtableid'' checks in in6_selectsrc(). ok bluhm@
2015-10-19Remove superfluous NULL checks.Martin Pieuchot
ifa are refcounted to ensure that rt_ifa is always valid.
2015-10-19deduplicate in[6]_pcbbind() port scan loop.Vincent Gross
ok mpi@
2015-10-18Add two new system calls: dnssocket() and dnsconnect(). This creates aTheo de Raadt
SS_DNS tagged socket which has limited functionality (for example, you cannot accept on them...) The libc resolver will switch to using these, therefore pledge can identify a DNS transaction better. ok tedu guenther kettenis beck and others
2015-10-15in6_pcbconnect() returns EADDRNOTAVAIL whenVincent Gross
all the ports in the range portfirst .. portlast are in use. ok millert@, mpi@
2015-10-13Make use of rtisvalid(9) to check if local route entries match existingMartin Pieuchot
configured addressses. ok mikeb@
2015-10-13Use rtisivalid(9) to check if the given (cached) route can be used.Martin Pieuchot
Note that after calling rtalloc(9) we only check if a route has been returned or not and do not check for its validity. This cannot be improved without a massive refactoring. The kernel currently *do* use !RTF_UP route due to a mismatch between the value of ifp->if_link_state and the IFF_UP|IFF_RUNNING code. I'd explain the RTF_UP flag as follow: . If a cached route entry w/o RTF_UP is passed to ip{6,}_output(), . call rtalloc(9) to see if a better entry is present in the tree. This is enough to support MPATH and route cache invalidation. ok bluhm@
2015-10-09Rename tame() to pledge(). This fairly interface has evolved to be moreTheo de Raadt
strict than anticipated. It allows a programmer to pledge/promise/covenant that their program will operate within an easily defined subset of the Unix environment, or it pays the price.
2015-10-07Initialize the routing table before domains.Martin Pieuchot
The routing table is not an optional component of the network stack and initializing it inside the "routing domain" requires some ugly introspection in the domain interface. This put the rtable* layer at the same level of the if* level. These two subsystem are organized around the two global data structure used in the network stack: - the global &ifnet list, to be used in process context only, and - the routing table which can be read in interrupt context. This change makes the rtable_* layer domain-aware and extends the "struct domain" such that INET, INET6 and MPLS can specify the length of the binary key used in lookups. This allows us to keep, or move towards, AF-free route and rtable layers. While here stop the madness and pass the size of the maximum key length in *byte* to rn_inithead0(). ok claudio@, mikeb@
2015-10-05user land -> userland; from Rob PierceTheo de Raadt
2015-10-01Use rtdeletemsg() in nd6_free() to align it with arptfree().Martin Pieuchot
This gives us userland notification for free and get rid of a rtrequest1(9) call. ok phessler@, mikeb@, sthen@
2015-09-28Merge gif(4)'s tentacles in a single file.Martin Pieuchot
Tested by <mxb AT alumni DOT chalmers DOT se>. ok dlg@
2015-09-23Always increment rt_use inside rtalloc(9) instead of doing it in someMartin Pieuchot
specific places. ok claudio@, benno@
2015-09-22Remove inpt_lastport from struct inpcbtable, use local variablesVincent Gross
in in_pcbbind() and in6_pcbsetport() ok claudio@, with input from David Hill