summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospf6d/kroute.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* IF_IFACE_AVAIL is never used/checked, wipe it.denis2020-05-171-3/+1
| | | | OK remi@
* When IMSG_IFADD is removed, IMSG_IFDELETE becomes uselessdenis2020-05-161-7/+1
| | | | OK remi@
* Rework route priority filter.denis2019-12-161-3/+45
| | | | reads OK benno@ remi@
* Refactor kernel route message handling.denis2019-12-121-179/+70
| | | | OK remi@
* Detect and remove routes in the kernel routing table with priorityremi2019-01-021-9/+22
| | | | | | | RTP_OSPF (or the configured fib-priority) inserted by another program. ospfd does the same. OK claudio@ benno@
* Add config option fib-priority to set a custom prio for routes ospf6dremi2018-12-291-10/+12
| | | | | | inserts into the kernel routing table. OK denis@
* Add support for rdomains.remi2018-07-121-5/+8
| | | | | small quirk from tb@ ok phessler@
* With the "depend on" option routes are sent out with a metric of 65535 ifremi2018-07-121-8/+4
| | | | | | | the referenced interface is down or in state backup. This is especially useful on a carp cluster to ensure all traffic goes to the carp master. ok friehm@ jca@
* If intra area prefixes move from one router to another router, cloning routesfriehm2018-07-101-4/+23
| | | | | | | | | | | may become gateway routes and contrary. The kernel does not allow to change the flags RTF_GATEWAY / RTF_CLONING in RTM_CHANGE messages, but ospf6d tried this anyway. The result is a broken route. Instead of modifying such routes remove the old route and insert a new one. Thanks to Raimund Specht for reporting the problem and testing the fix. OK claudio@
* Let kroute_matchgw() select the correct route before checking flags.friehm2018-07-101-3/+3
| | | | OK claudio@
* ospf6d mostly only cares about AF_INET6 routesbenno2018-02-081-2/+2
| | | | | found while investigating routing socket desync with claudio. ok remi jca claudio
* Kill dead assignement.jca2017-11-051-2/+1
|
* Import route priority support from ospfd to ospf6d.friehm2017-06-191-80/+63
| | | | | | | Also remove the RTF_UP flag from hdr.rtm_flags in send_rtmsg() since ospfd and bgpd don't set the flag. OK bluhm@ claudio@
* Adding multipath route support to ospf6d. Almost copied from ospfd.friehm2017-05-301-63/+130
| | | | OK bluhm@
* Replace struct rroute with struct kroute, as done in ospfdjca2016-12-271-23/+21
| | | | ok claudio@
* Let rde and ospfe know about all IFINFO messages (eg an interface MTU change).jca2016-12-221-7/+7
| | | | | | | The parent now passes all IFINFO messages down to the children, then looks whether he has any work to do. Same idea as ospfd. ok benno@ claudio@
* Similar to bgpd and ospfd skip broadcast (should not happen) and llinfoclaudio2015-07-171-3/+14
| | | | routes also adjust the tracking of connected routes to the new way.
* Use sizeof(u_short) in the first check since there are RT messages thatclaudio2015-02-111-2/+2
| | | | | are less then sizeof(*rtm) bytes long (e.g. interface announcements). Found the hard way by phessler@
* Same session_socket_blockmode() changes as done to ospfd. Also do the sameclaudio2015-02-101-2/+8
| | | | kroute change (make socket non-blocking and add trigger for partial reads).
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* The second level of the CTL_NET sysctl is a PF_*, not an AF_*guenther2014-06-231-3/+3
| | | | inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
* another simple %i to %d conversion for obviousnessderaadt2013-10-301-3/+3
|
* sync comment typos/whitespace with ospfdsthen2013-03-221-3/+4
|
* kroute.c rev 1.69 of ospfd for ospf6dflorian2013-01-141-3/+13
| | | | | | | | | | | ------------------------------------------------------------------------ date: 2009/06/02 20:16:59; author: claudio; state: Exp; lines: +13 -3 Track reject and blackhole routes and allow them to be redistributed even though they point to the loopback. Mainly used for redistribute default since on default free routers we need to have a fake route now. After discussion with Tonnerre Lombard, idea OK henning@ ------------------------------------------------------------------------ ok claudio@
* Move common ospf6d functions for ipv6 address manipulation intobluhm2012-10-211-133/+1
| | | | | util.c to reuse them in ospf6ctl. OK claudio@
* The current code in ospf6d kroute tries to read the scope of thebluhm2012-09-201-9/+18
| | | | | | | route from the gateway's scope id. That does not work as the kernel provides the scope id via the kame hack instead of the sin6_scope_id field of the sockaddr_in6. Call recoverscope() to fix that. OK claudio@
* Instead of fiddling about the kame hack here and there, implementbluhm2012-09-191-18/+57
| | | | | the functions embedscope(), recoverscope(), clearscope(). ok claudio@
* Fix trailing whitespaces.bluhm2012-09-171-2/+2
|
* It helps to set the sdl_family so that the kernel knows what this is.claudio2011-07-071-1/+2
|
* Rework the distribution of link state and iface FSM state changes.claudio2011-07-071-3/+6
| | | | | Link state changes are sent from the parent to both childs and iface FSM state changes are sent from the ospfe to the rde.
* Only send interface address changes to the ospfe/rde if the interfaceclaudio2011-07-071-15/+21
| | | | | is actually used by the config. This should fix the exits caused when interfaces are dynamically added to the kernel.
* Commit stuff that I added to another tree eventhough it should haveclaudio2011-07-071-3/+3
| | | | | been in the last commit. I should not work on multiple laptops at the same time.
* Kill nh_reachable. Link state checking is so easy now that it does notclaudio2011-07-071-14/+10
| | | | matter anymore to cache this value for ospf6d.
* LINK_STATE_IS_UP() cleanup userland part. There is no need to specialclaudio2011-07-041-8/+3
| | | | | | | | case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
* continguous -> contiguoushenning2011-03-071-2/+2
| | | | From: "Anthony J. Bentley" <anthonyjbentley at gmail dot com>
* Same fix as previously commited to ospfd. Ensure that kr_redistribute()claudio2010-10-141-5/+6
| | | | is called with the head node of a multipath chain.
* Redistributing the default route with ospf6d did not work correctly.bluhm2010-08-221-6/+5
| | | | | | | | | - kroute.c may not ignore the default route. - Use the ROUNDUP macro from route/show.c as this one is also correct for netmask with prefixlen 0. - Implement ospf_redistribute and the redistribute parser like ospfd. ok claudio@
* Another hand knitted offsetof() that needs to die. This time steal theclaudio2010-07-141-6/+6
| | | | mask2prefixlen6 version from bgpd.
* Merge duplicate log messages into one log_warn().bluhm2010-07-121-14/+5
| | | | ok claudio@
* Update the interfaces changes from kroute to rde via imsg. Thisbluhm2010-07-061-1/+4
| | | | | is needed to orginate correct intra-area-prefix-lsas. ok claudio@ stsp@
* Fix all white space bugs in ospf6d at once. No binary change.bluhm2010-07-011-4/+4
| | | | ok claudio@
* The prefixes of interface addresses of an ospf link have to bebluhm2010-07-011-1/+71
| | | | | | | | | advertised as link-lsa and intra-area-prefix-lsa when they change dynamically. Handle RTM_NEWADDR and RTM_DELADDR in kroute by sending an imsg to ospfe. Upon this event, originate a new link-lsa in ospfe. In rde a new intra-area-prefix-lsa is generated when a link-lsa appears or goes away. ok claudio@; ok and test stsp@
* If there is no next hop but an interface index, create a cloningbluhm2010-06-281-1/+22
| | | | | | | | route. This happens when we learn from another router that a directly attached link has a prefix for which we have no address configured at the interface. In this case, we should do neighbor discovery to directly reach the hosts with that prefix on the link. ok claudio@
* The "dispatch_rtmsg no nexthop" error was emitted in wrong casesbluhm2010-06-121-2/+2
| | | | | | and prevented dynamic route redistribution. Fix the logic bug that was introduced during IPv4 to IPv6 conversion. ok claudio@
* Only embed the interface scope for link local nexthops. AS-ext LSA haveclaudio2010-06-091-4/+8
| | | | | an optional non link local forwarding address so we need to be a bit more careful here. Problem found and analyzed by Martin Pelikán.
* This is a total dejavu of bgpd/kroute.c 1.165. Because IPv6 fucked up andclaudio2010-02-231-28/+30
| | | | | | | created a badly sized struct sockaddr_in6 we need to add some magic pading on 64bit archs. Code stolen from bgpd after a painful afternoon of bug hunting, head scratching and violent cursing. Now ospf6d works on 64bit archs.
* Loopback interface don't have link local addresses so use the real IPv6claudio2009-12-231-2/+3
| | | | address for so that the device is no considered unnumbered.
* Holy inconsitancy Batman! While it is impossible to use embeded scope idsclaudio2009-12-221-2/+10
| | | | | | | | in almost all sockaddr_in6 addresses it is required for the nexthop and sin6_scope_id is actually ignored there. This needs to be fixed but my quota of IPv6 insanity is already used for today. Workaround for now. My simple testsetup is now actually able to install the first ospf6d learned routes in the kernel. Weeee!
* Add interface index aka. scope id to struct kroute so that the rde can passclaudio2009-12-221-11/+27
| | | | | this information to kroute and kroute can use that information to fill in the various sin6_scope_id fields.
* Another AF_INET that should be an AF_INET6.claudio2009-12-211-2/+2
|