summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2015-11-14Remove mrtdebug and reduce differences with the v6 version.Martin Pieuchot
Debug informations can already be accessed via mrtstat and pimstat.
2015-11-14Grab the KERNEL_LOCK around ip_mforward(), in preparation for unlockingMartin Pieuchot
ip_input(). Note that ipmforwarding is not enabled by default. ok deraadt@, phessler@
2015-11-13Do not cast malloc(9) results.Martin Pieuchot
2015-11-13Kill another tunnel leftover and keep PIM stuff inside #ifdef PIM.Martin Pieuchot
2015-11-13Sore the index of the interface used for revarp instead of a pointer toMartin Pieuchot
its descriptor. Get rid of a if_ref(). ok dlg@
2015-11-12Kill another leftover from the tunnel support removal and add more PIM.Martin Pieuchot
2015-11-12Sync headers and get rid of #ifdef MROUTING.Martin Pieuchot
2015-11-12Remove VIFF_TUNNEL leftovers, tunnels aren't supported since 2006.Martin Pieuchot
Even pimd(8) no longer support them.
2015-11-12Fix PIM build.Martin Pieuchot
2015-11-12IFQ_DROP means a drop because enqueue on the send q failed, not cos txDavid Gwynne
later failed.
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-11Store an interface index instead of a pointer that's never dereferenced.Martin Pieuchot
Get rid of an if_ref()/if_put() dance. ok dlg@
2015-11-07Use input handlers for bridge(4).Martin Pieuchot
This allows more flexible configurations with vlan(4) and bridge(4) on top of the same physical interface. In particular it allows to not feed VLAN tagget packets into a bridge(4). Fix regression reported by Armin Wolfermann on bugs@, ok dlg@
2015-11-06In in_arpinput() do not make an extra route lookup to check wetherAlexander Bluhm
the sender address is a local IP. The arplookup() does this route lookup anyway, so just check its result. OK mpi@
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-05In in_arpinput() replace the loops over the interface addressesAlexander Bluhm
with route lookups. Check wether ARP sender or target protocol address is a local IP address. Remove the loop that checks wether any IPv4 address is configured on the receiving interface. input, test, OK mpi@
2015-11-04use ml_purge to flush the arp hold lists instead of dequeue/free loops.David Gwynne
this is an interesting change because the loops have to decrement the global hold count too. they looked like this: while ((mh = ml_dequeue(&la->la_ml)) != NULL) { la_hold_total--; m_freem(mh); } because ml_purge returns how many mbufs were freed, we can do this: la_hold_total -= ml_purge(&la->la_ml); ok mpi@ bluhm@
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-03Plumb Chacha20-Poly1305 into the IPsec/ESP and PF_KEY frameworksMike Belopuhov
ok naddy
2015-11-02Remove leftovers from previous carp(4)-to-relayd(8) conversion diff.Martin Pieuchot
Pointed by and ok reyk@
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-02Rename the list of arp entries to arp_list. This is consistent toAlexander Bluhm
the other arp variables and nd6. Convert a hand-crafted loop to LIST_FOREACH_SAFE. OK mpi@
2015-11-01Replace the nd6 llinfo malloc(9) with pool_get(9) like arp does.Alexander Bluhm
OK mpi@
2015-10-30Rename rtrequest1() to rtrequest().Alexander Bluhm
OK mpi@
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-27RIP arp_ifinit().Martin Pieuchot
2015-10-27Rewrite in_ouraddr() to not use ``rt_ifa'' since it is not obvious thatMartin Pieuchot
the lifetime of an ``ifa'' is tied to a route entry, so it might no longer be valid after calling rtfree(9). While here put a KERNEL_LOCK() around the per-ifp address list iteration. ok bluhm@
2015-10-27Move code around for clarity, no functional change.Martin Pieuchot
ok bluhm@
2015-10-26Use rt_ifidx rather than rt_ifp.Martin Pieuchot
ok bluhm@
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-25Instead of doing the the if_get() dance for rt_missmsg(), change theAlexander Bluhm
function to take an interface index. discussed with mpi@; 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-10-24Convert some if_ref() to if_get().Martin Pieuchot
ok claudio@
2015-10-23``rt_ifp'' cannot be NULL.Martin Pieuchot
ok claudio@
2015-10-22Drop historical comment and an old '#if notyet'.Martin Pieuchot
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-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-22Do not pass an ``ia'' just to dereference ``ia_ifp''.Martin Pieuchot
ok claudio@, bluhm@, jsg@
2015-10-22Do not dereference ``ia_ifp'' when we already have an ``ifp'' pointer.Martin Pieuchot
2015-10-20add a new getsockopt option IP_IPDEFTTL to retrieve the default ttl.Sebastian Benoit
this can be used as an alternative to sysctl net.inet.ip.ttl, in programs that use pledge(). ok reyk@, "Like this" deraadt@
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 a missing ``rtableid'' check in in_selectsrc(). ok bluhm@
2015-10-19Sync rtisvalid(9) check for local route entries with r1.257 ofMartin Pieuchot
net/ip_input.c
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-14Init a variable in the recently added carp_vhe_match() function clangJonathan Gray
and mpi believe could be used uninitialised. ok mpi@
2015-10-13Make use of rtisvalid(9) to check if local route entries match existingMartin Pieuchot
configured addressses. ok mikeb@
2015-10-13Simplify arptfree() to no longer look at the route entry's refcounter.Martin Pieuchot
ARP entries with an expired timeout are now removed from the tree even if they are cached somehwere else. This also reduces differences with NDP. ok bluhm@
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@