summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_mroute.c
AgeCommit message (Collapse)Author
2017-02-05Use percpu counters for ip6statJeremie Courreges-Anglas
Try to follow the existing examples. Some notes: - don't implement counters_dec() yet, which could be used in two similar chunks of code. Let's see if there are more users first. - stop incrementing IPv6-specific mbuf stats, IPv4 has no equivalent. Input from mpi@, ok bluhm@ mpi@
2017-02-01In sogetopt, preallocate an mbuf to avoid using sleeping mallocs withDavid Hill
the netlock held. This also changes the prototypes of the *ctloutput functions to take an mbuf instead of an mbuf pointer. help, guidance from bluhm@ and mpi@ ok bluhm@
2017-01-06Kill various splsoftnet().Martin Pieuchot
ok rzalamena@, visa@
2016-12-22Remove PIM support from the multicast stack.Rafael Zalamena
ok mpi@
2016-10-03Convert some of the remaining usages of time_second to time_uptime.Martin Pieuchot
time_second is unix time so it can be affected by clock changes. time_uptime is monotonic so it isnt affected by clock changes. that in turn means route expiries wont jump with clock changes if set against time_uptime. the expiry is translated into unix time for export to userland though. Should fix mismatch between route timers that were already converted and ND default routers that were still using time_second. Tested by matthieu@ and sthen@ ok sthen@, dlg@
2016-08-23Do not use a single global struct route_in6 to cache route lookups.Martin Pieuchot
This is a little step towards deprecating 'struct route{,_in6}'. ok jca@, claudio@
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-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@
2015-12-03add sizes to some free() calls. ok claudioTed Unangst
2015-11-13Do not cast malloc(9) results.Martin Pieuchot
2015-11-12Do not try to guess if there's still an IPv4 multicast routing daemonMartin Pieuchot
using an interface based on the value of ``ip_mrouter''. Calling SIOCDELMULTI on an interface is correct even if such daemon is running because the Ethernet layer refcounts currently joined multicast groups.
2015-11-12Unbreak adding a MIFF_REGISTER interface.Martin Pieuchot
Such interface is created on the fly so if_get() could return NULL because mif6c_pifi doesn't mean what you think in this case.
2015-11-12unidef MRT6DEBUGMartin Pieuchot
2015-11-12More PIM love. Reduce differences with ip_mroute.c and dynamicallyMartin Pieuchot
allocate the register ifp such that if_get() works.
2015-11-12Sync headers and get rid of #ifdef MROUTING.Martin Pieuchot
2015-11-12Fix PIM build.Martin Pieuchot
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-09-13There's no point in abstracting ifp->if_output() as long as pf_test()Martin Pieuchot
needs to see lo0 in the output path. ok claudio@
2015-09-12Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.Martin Pieuchot
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@
2015-09-12Introduce if_input_local() a function to feed local traffic back toMartin Pieuchot
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@
2015-09-11Kill yet another argument to functions in IPv6. This time ip6_output'sClaudio Jeker
ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
2015-09-10More complicated if_put dance. Special handling for multicast_register_ifClaudio Jeker
which is probably not even needed here but who knows for sure. OK dlg@
2015-08-24In kernel initialize struct sockaddr_in and sockaddr_in6 to zeroAlexander Bluhm
everywhere to avoid passing around pointers to uninitialized stack memory. While there, fix the call to in6_recoverscope() in fill_drlist(). OK deraadt@ mpi@
2015-07-15rename mbuf ** parameter from m to mp, to match other similar codeTheo de Raadt
2015-07-08Pass an interface index instead of a pointer to in6_addr2scopeid().Martin Pieuchot
ok millert@
2015-06-30Get rid of the undocumented & temporary* m_copy() macro added forMartin Pieuchot
compatibility with 4.3BSD in September 1989. *Pick your own definition for "temporary". ok bluhm@, claudio@, dlg@
2015-06-16Store a unique ID, an interface index, rather than a pointer to theMartin Pieuchot
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@
2015-06-08More damned eye searing whitespace. No change to .o files.Kenneth R Westerback
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-09Implement 2 sysctl to retrieve the multicast forwarding cache (mf6c) and theClaudio Jeker
multicast interface table (mif6). Will be used by netstat soon. Looked over by guenther@
2015-02-09convert the multicast filter hash to use siphash, like i did forDavid Gwynne
ip_mroute.c requested by and ok claudio@
2015-02-08Rename some of the functions by adding a 6 so they do not conflict withClaudio Jeker
the still static functions in ip_mroute.c OK phessler, henning
2014-12-19unifdef INET in net code as a precursor to removing the pretend option.Ted Unangst
long live the one true internet. ok henning mikeb
2014-12-17Remove the "multicast_" prefix from the fields a multicast-only struct.Martin Pieuchot
Prodded by claudio@ and mikeb@
2014-12-17Use an interface index instead of a pointer for multicast options.Martin Pieuchot
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@
2014-12-05Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.Martin Pieuchot
ok mikeb@, krw@, bluhm@, tedu@
2014-09-08remove uneeded route.h includesJonathan Gray
ok miod@ mpi@
2014-08-19Keep pim code under #ifdef PIM to be coherent with what's in netinet/.Martin Pieuchot
2014-08-14No need for raw_cb.hMartin Pieuchot
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-06-03Do not include <sys/malloc.h> where it is not needed.Martin Pieuchot
2014-03-10In ip6_mrouter_set() and ip6_mrouter_get(), change the error numberLawrence Teo
EACCES to EPERM. EACCES is meant for file access permissions (as documented on the errno(2) man page), so EPERM seems more appropriate. Based on a similar change from FreeBSD via Loganaden Velvindron. ok bluhm@
2013-11-11Replace most of our formating functions to convert IPv4/6 addresses fromMartin Pieuchot
network to presentation format to inet_ntop(). The few remaining functions will be soon converted. ok mikeb@, deraadt@ and moral support from henning@
2013-10-27delete UPCALL_TIMING debug code from a the dark agesTheo de Raadt
2013-10-21remove GET_TIME() wrapperTheo de Raadt
2013-10-17The header file netinet/in_var.h included netinet6/in6_var.h. ThisAlexander Bluhm
created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
2013-10-09Fix a possible mbuf leak, from NetBSD via Loganaden Velvindron.Martin Pieuchot
ok claudio@, henning@
2013-05-31Remove a bunch of sockaddr_in6 pointer casts and replace othersAlexander Bluhm
with sin6tosa() or satosin6() inline functions. This allows the compiler to check the types more strictly. OK mpi@
2013-05-14Fix build with MRT6DEBUG defined.Martin Pieuchot
2013-05-02tedu broken Resource Reservation Protocol code that was ifdef RSVP_ISI.Martin Pieuchot
ok deraadt@, tedu@ (implicit)