summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_output.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* a few redundant tests can be deleted now that switch cases are only fortedu2015-10-291-4/+4
| | | | a single value
* oops, one firebomb went off course. put back some code that's still used.tedu2015-10-291-1/+56
|
* RFC 2292 API support was removed 9 years ago, but left in a binary compattedu2015-10-291-231/+1
| | | | | | | 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!)
* Remove linkmtu and maxmtu from struct nd_ifinfo. IN6_LINKMTU can nowflorian2015-10-281-28/+6
| | | | | die and ifp->if_mtu is the one true mtu. Suggested by and OK mpi@
* Remove IPV6_NEXTHOP implementation. Source routing is considered to beflorian2015-10-251-91/+4
| | | | | | a bad idea these days. kill it mpi@ general agreement in the network hackers room at u2k15
* Convert some if_ref() to if_get().mpi2015-10-241-3/+3
| | | | ok claudio@
* Stop checking for RTF_UP directly, call rtisvalid(9) instead.mpi2015-10-191-4/+4
| | | | | | While here add two missing ``rtableid'' checks in in6_selectsrc(). ok bluhm@
* Always increment rt_use inside rtalloc(9) instead of doing it in somempi2015-09-231-7/+1
| | | | | | specific places. ok claudio@, benno@
* 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@
* Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.mpi2015-09-121-4/+2
| | | | | | | | | 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-121-2/+2
| | | | | | | | | | 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@
* if_put after if_get for in6_src and ip6_output which got a lot easier afterclaudio2015-09-111-15/+29
| | | | all the cleanup by mpi@ since we no longer overwrite ifps, etc. OK dlg@
* Rewrite in6_selectroute() to no longer return an ifp.mpi2015-09-111-10/+7
| | | | | | | The returned "struct rtentry" is either the cached one or the one passed in options. ok claudio@
* Move the multicast option parsing out of in6_selectroute().mpi2015-09-111-11/+21
| | | | ok claudio@
* Kill selectroute().mpi2015-09-111-2/+2
| | | | ok claudio@
* Kill yet another argument to functions in IPv6. This time ip6_output'sclaudio2015-09-111-12/+2
| | | | | | | ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
* Stop using in6_ifstat_inc().mpi2015-09-101-25/+2
| | | | ok dlg@, claudio@
* Compute the checksum before looping back the copy of a multicast packet.mpi2015-08-311-4/+9
| | | | | | Found while comparing IPv4 and IPv6 versions. ok naddy@
* `encif' should only be used under #ifdef NPF.mpi2015-08-311-3/+2
| | | | Reported by jsg@, ok deraadt@
* Kill IP_ROUTETOETHER.mpi2015-07-161-3/+3
| | | | | | | | | This pseudo-option is a hack to support return-rst on bridge(4). It passes Ethernet information via a "struct route" through ip_output(). "struct route" is slowly dying... ok claudio@, benno@
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-4/+4
| | | | ok stsp mpi
* Get rid of the undocumented & temporary* m_copy() macro added formpi2015-06-301-2/+2
| | | | | | | | compatibility with 4.3BSD in September 1989. *Pick your own definition for "temporary". ok bluhm@, claudio@, dlg@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-3/+3
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* More damned eye searing whitespace. No change to .o files.krw2015-06-081-12/+12
|
* remove PACKET_TAG_IPSEC_PENDING_TDB, it is never set; ok mikeb@markus2015-05-231-16/+3
|
* test mbuf pointers against NULL not 0jsg2015-05-131-5/+5
| | | | ok krw@ miod@
* Stubs and support code for NIC-enabled IPsec bite the dust.mikeb2015-04-171-4/+2
| | | | No objection from reyk@, OK markus, hshoexer
* remove unfinished/unused support for socket-attached ipsec-policiesmarkus2015-04-161-43/+1
| | | | ok mikeb
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Remove a chunk that should have been deleted in r1.166, this was safempi2015-02-121-13/+1
| | | | | | | | because clearing fields twice is not a problem. Yeah, I suck at applying diff. ok henning@, claudio@
* Make sure pf(4) does not see embedded scopes.mpi2015-02-051-1/+29
| | | | | | | | | | | | | Packets destinated to link-local addresses are looped back with embedded scopes because we cannot restore them using the receiving interface (lo0). Embedded scopes are needed by the routing table to match RTF_LOCAL routes, but pf(4) never saw them and existing rules are likely to break without teaching the rule engine about them, found by dlg@ the hard way. So save and restore embedded scopes around pf_test() for packets going through loopback. ok dlg@, mikeb@
* Remove the "multicast_" prefix from the fields a multicast-only struct.mpi2014-12-171-12/+12
| | | | Prodded by claudio@ and mikeb@
* Use an interface index instead of a pointer for multicast options.mpi2014-12-171-6/+6
| | | | | | | | | | | | Output interface (port) selection for multicast traffic is not done via route lookups. Instead the output ifp is registred when setsockopt(2) is called with the IP{V6,}_MULTICAST_IF option. But since there is no mechanism to invalidate such pointer stored in a pcb when an interface is destroyed/removed, it might lead your kernel to fault. Prevent a fault upon resume reported by frantisek holop, thanks! ok mikeb@, claudio@
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Rework the handling of interfaces and IPv6 addresses for local delivery.mpi2014-11-201-61/+18
| | | | | | | | | | | | | | | | | | | | | | | | - Unicast packets sent to any local address will have their interface set to loobpack. - In order to differentiate traffic from interfaces having identical link-local addresses, provide the scoped addresses to pf(4). - Update the icmp6 state lookup logic to match scoped MLL addresses. - Remove a shortcut in ip6_input() that bypasses pf and always look for an RTF_LOCAL route. Packets sent to multicast addresses still retain their original interface due to the fact that local multicast packet delivering does not use if_output. This makes ping6 to link-local addresses work even with pf enabled and "set skip" on loopbacks, reported by Pieter Verberne. Debugged, analysed and tested with mikeb@. ok mikeb@, henning@, sthen@
* Rename rtalloc1() into rtalloc(9) and convert its flags to only enablempi2014-11-011-5/+5
| | | | | | functionnality instead of a mix of enable/disable. ok bluhm@, jca@
* Use rtfree() instead of RTFREE(), NULLify some free'd route pointers andmpi2014-10-141-7/+7
| | | | | | kill the macro. ok mikeb@, henning@
* Kill rtalloc() and update rtalloc1() and rtalloc_mpath() to no longermpi2014-09-271-3/+5
| | | | | | rely on "struct route" that should die. ok claudio@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-12/+12
| | | | after discussions with beck deraadt kettenis.
* we'll do fine without casting NULL to struct foo * / void *henning2014-04-211-2/+2
| | | | ok gcc & md5 (alas, no binary change)
* move in6_cksum_phdr from in6.h to ip6_output.c to mirror in_cksum_phdrnaddy2014-04-201-1/+41
| | | | ok henning@
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-5/+5
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* since the cksum rewrite the counters for hardware checksummed packetshenning2014-01-231-1/+8
| | | | | | | | | | are are lie, since the software engine emulates hardware offloading and that is later indistinguishable. so kill the hw cksummed counters. introduce software checksummed packet counters instead. tcp/udp handles ip & ipvshit, ip cksum covered, 6 has no ip layer cksum. as before we still have a miscounting bug for inbound with pf on, to be fixed in the next step. found by, prodding & ok naddy
* put the in{,6}_delayed_cksum() and in{,6}_proto_cksum_out() prototypesnaddy2014-01-231-2/+1
| | | | into consistent locations; ok henning@
* Split the checksum calculation for IPv6 like for IPv4:naddy2014-01-221-2/+25
| | | | | | | Always calculate the pseudo-header checksum. Complete the checksum if hardware offload is not available. Parts originally from NetBSD; ok henning@
* Do not clean the multicast records of an interface when it is destroyedmpi2014-01-211-3/+4
| | | | | | | | | | | (unplugged). Even if it makes no sense to keep them around if the interface is no more, we cannot safely remove them since pcb multicast options might keep a pointer to them. Fixes a user after free introduced by the multicast address linking rewrite and reported by Alexey Suslikov, thanks! ok claudio@
* Call all local valiables of type struct in6_ifaddr "ia6". This isbluhm2014-01-131-5/+5
| | | | | consistent with struct ifaddr "ifa" and struct in_ifaddr "ia". OK mpi@
* Back when some NRL code was merged into KAME to create the *BSD IPV6deraadt2013-10-231-3/+3
| | | | | | | | stack (factoid: by a bunch of people in my living room), some compatibility #define's were created to shim incompatible inpcb access methods. There was an understanding they would eventually be removed. Since they are error prone, and 1999 is a long time ago, now they die. ok mikeb claudio mpi
* pretty up a disgusting chunkderaadt2013-10-211-4/+2
|