summaryrefslogtreecommitdiffstats
path: root/sys/netinet6 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* in6_pcbconnect() returns EADDRNOTAVAIL whenvgross2015-10-151-3/+4
| | | | | | | all the ports in the range portfirst .. portlast are in use. ok millert@, mpi@
* Make use of rtisvalid(9) to check if local route entries match existingmpi2015-10-131-2/+2
| | | | | | configured addressses. ok mikeb@
* Use rtisivalid(9) to check if the given (cached) route can be used.mpi2015-10-131-8/+6
| | | | | | | | | | | | | | | | | | 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@
* Rename tame() to pledge(). This fairly interface has evolved to be morederaadt2015-10-091-4/+4
| | | | | | 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.
* Initialize the routing table before domains.mpi2015-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | 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@
* user land -> userland; from Rob Piercederaadt2015-10-051-2/+2
|
* Use rtdeletemsg() in nd6_free() to align it with arptfree().mpi2015-10-011-7/+2
| | | | | | | This gives us userland notification for free and get rid of a rtrequest1(9) call. ok phessler@, mikeb@, sthen@
* Merge gif(4)'s tentacles in a single file.mpi2015-09-283-234/+2
| | | | | | Tested by <mxb AT alumni DOT chalmers DOT se>. ok dlg@
* Always increment rt_use inside rtalloc(9) instead of doing it in somempi2015-09-231-7/+1
| | | | | | specific places. ok claudio@, benno@
* Remove inpt_lastport from struct inpcbtable, use local variablesvgross2015-09-221-14/+14
| | | | | | in in_pcbbind() and in6_pcbsetport() ok claudio@, with input from David Hill
* Do not manually decrement rt's refcounter in nd6_lookup() and let thempi2015-09-185-50/+75
| | | | | | callers rtfree(9) it. Inputs and ok bluhm@
* There's no point in abstracting ifp->if_output() as long as pf_test()mpi2015-09-132-3/+4
| | | | | | needs to see lo0 in the output path. ok claudio@
* Get the default loopback interface pointer just after doing a routempi2015-09-131-2/+5
| | | | | | | | | lookup to ensure pf_test() is called with the same interface in the input annd output path for local traffic. Fix a regression reported by Heiko Zimmermann on bugs@, thanks! ok mikeb@, claudio@
* Now that rtrequest1(9) properly sets RTF_UP for newly added route,mpi2015-09-124-15/+13
| | | | | | stop passing it in every rt_ifa_add(9) calls. ok claudio@
* Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.mpi2015-09-123-15/+5
| | | | | | | | | Use instead the RTF_LOCAL flag to loop local traffic back to the corresponding protocol queue. With this change rt_ifp is now always the same as rt_ifa->ifa_ifp. ok claudio@
* Introduce if_input_local() a function to feed local traffic back tompi2015-09-123-6/+6
| | | | | | | | | | the protocol queues. It basically does what looutput() was doing but having a generic function will allow us to get rid of the loopback hack overwwritting the rt_ifp field of RTF_LOCAL routes. ok mikeb@, dlg@, claudio@
* Bad whatever, that if_put() should not be there. Found the hard way by deraadt@claudio2015-09-111-2/+1
| | | | OK mpi@
* if_put after if_get for in6_src and ip6_output which got a lot easier afterclaudio2015-09-112-17/+38
| | | | all the cleanup by mpi@ since we no longer overwrite ifps, etc. OK dlg@
* if_put after if_get for nd6_nbr. OK dlg@claudio2015-09-111-1/+7
|
* if_put after if_get when IP6_EXTHDR_GET fails in icmp6_input.dlg2015-09-111-1/+2
| | | | | | | claudio missed this one cos he was drunk while he was supposed to be fixing this file. ok claudio@ mpi@
* Rewrite in6_selectroute() to no longer return an ifp.mpi2015-09-113-79/+28
| | | | | | | The returned "struct rtentry" is either the cached one or the one passed in options. ok claudio@
* Convert _TM_ flags to TAME_ flags, collapsing the entire mappingderaadt2015-09-111-2/+2
| | | | | | layer because the strings select the right options. Mechanical conversion. ok guenther
* When pf modifies a TCP packet, it sets the M_TCP_CSUM_OUT flag inbluhm2015-09-111-3/+3
| | | | | | | | | | | | | | | | | the mbuf packet header. If the packet and is later dropped in ip6_forward(), the TCP mbuf is copied and passed to icmp6_error(). IPv6 uses m_copym() and M_PREPEND() which preserve the packet header. The inherited M_TCP_CSUM_OUT flag generates ICMP6 packets with an incorrect checksum. So reset the csum_flags when packets are generated by icmp6_reflect() or icmp6_redirect_output(). IPv4 does m_copydata() into a fresh mbuf. There m_inithdr() clears the packet header, so the problem does not occur. But setting the csum_flags explicitly also makes sense for icmp_send(). Do not or M_ICMP_CSUM_OUT to a value that is 0 because of some function calls before. OK mpi@ lteo@
* Move the multicast option parsing out of in6_selectroute().mpi2015-09-113-47/+45
| | | | ok claudio@
* Kill selectroute().mpi2015-09-113-35/+7
| | | | ok claudio@
* if_put for ip6_input. OK mpi@claudio2015-09-111-14/+15
|
* if_put for icmp6. Again we cheat a bit with the hop limit to simplify the code.claudio2015-09-111-12/+15
| | | | OK mpi@
* Only include <sys/tame.h> in the .c files that need itguenther2015-09-111-1/+2
| | | | ok deraadt@ miod@
* Kill yet another argument to functions in IPv6. This time ip6_output'sclaudio2015-09-1110-31/+21
| | | | | | | ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
* in6_embedscope() needs to lose some weight. Remove the last argument.claudio2015-09-116-25/+19
| | | | | | | | | In all but two calls NULL is passed and in the other 2 cases the ifp is only used to maybe feed it to in6_selecthlim() to select the hoplimit for the link. Since in6_embedscope() only works on link-local addresses it does not matter what hop limit we select since the destination is directly reachable. OK florian@ mpi@
* It is time to put inet6 on a diet. Use the flensing knife and cut outclaudio2015-09-106-34/+19
| | | | | the 3rd argument of in6_recoverscope() and make it return void. OK dlg@ mikeb@
* Kill in6_ifstat_inc() and associated per-ifp storage.mpi2015-09-103-28/+3
| | | | | | The SIOCGIFSTAT_IN6 is no longer supported. ok mikeb@, claudio@, dlg@
* In IPv6 source address selection prefer addresses of the outgoingbluhm2015-09-101-1/+7
| | | | | interface. OK mpi@
* if_put dance, shuffle some code and switch a printf to print the ifindexclaudio2015-09-101-7/+12
| | | | | instead of the name so we don't have to if_get/if_put it for just that. OK dlg@
* Fewer in6_ifstat_inc()mpi2015-09-102-30/+3
| | | | ok mikeb@
* Stop using in6_ifstat_inc().mpi2015-09-101-25/+2
| | | | ok dlg@, claudio@
* More if_put suffling. OK dlg@claudio2015-09-101-9/+17
|
* More complicated if_put dance. Special handling for multicast_register_ifclaudio2015-09-101-3/+10
| | | | | which is probably not even needed here but who knows for sure. OK dlg@
* Another trivial if_put addition. OK dlg@claudio2015-09-101-1/+2
|
* Trivial if_put addition. OK dlg@claudio2015-09-101-1/+2
|
* Kill icmp6_ifstat_inc() and associated per-ifp storage.mpi2015-09-097-77/+11
| | | | | | The SIOCGIFSTAT_ICMP6 is no longer supported. ok dlg@, mikeb@, claudio@
* Kill some commented out in6_ifstat_inc().mpi2015-09-092-9/+2
|
* Kill a couple of if_get()s only needed to increment per-ifp IPv6 stats.mpi2015-09-091-10/+4
| | | | | | | | We do not export those per-ifp statistics and they will soon all die. "We're putting inet6 on a diet" claudio@ ok dlg@, mikeb@, claudio@
* Tunnels also need a cloning route.mpi2015-09-041-4/+7
| | | | Fix a regression reported by Brad.
* Make every subsystem using a radix tree call rn_init() and pass thempi2015-09-041-2/+1
| | | | | | | | | | | | | | | length of the key as argument. This way every consumer of the radix tree has a chance to explicitly initialize the shared data structures and no longer rely on another subsystem to do the initialization. As a bonus ``dom_maxrtkey'' is no longer used an die. ART kernels should now be fully usable because pf(4) and IPSEC properly initialized the radix tree. ok chris@, reyk@
* Change the order of operations for loopback interfaces to havempi2015-09-031-9/+13
| | | | | | | | ::1 configured before fe80::1. (lo0:0) in pf should resolve to 127.0.0.1 ::1. reported by and ok mikeb@
* Revert (again!) the two uses of rtisvalid(9), they break NFS!mpi2015-09-031-6/+8
| | | | Found the hardway by naddy@
* Convert ip{,6}_output() (cached) route entry checks to rtisvalid(9).mpi2015-09-031-8/+6
| | | | | | | | | This introduces a behavior change as we now reject !RTF_UP routes to output packets. This stricter check exposed a bug in the setup of new routes and was the reason for the previous revert. This should be now fixed by r1.229 of sys/net/route.c . ok bluhm@
* Revert the two uses of rtisvalid(9) for the moment, it breaks dhclient(8)mpi2015-09-021-6/+8
| | | | | | | | configured networks on RAMDISK kernels. The problem is that the default route installed by dhclient(8) does not have the RTF_UP flag in this environement and rtisvalid(9) doesn't allow you to use a RTF_DOWN route.
* Kill unused ``ia_net'' field in the struct in6_ifaddr, bad copympi2015-09-011-3/+2
| | | | | | | paste from the IPv4 time. While here update the comment about ``ia6_ndpr'' it's now only used for autoconf.