summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/kroute.c
AgeCommit message (Collapse)Author
2004-01-30please sparc64, with & ok claudioHenning Brauer
2004-01-28log & ignore RTM_CHANGE messages for that we don't find an exact matchHenning Brauer
apparently pppd loves to issue change messages twice, once with and once without netmask, and in the latter case we have to play the classless game, which could lead to additional entries with wrong netmask in our internal view of the routing table.
2004-01-27make rt_sendmsg's local nextop and prefix struct in_addr too and don't useHenning Brauer
log_ntoa, claudio ok
2004-01-27move strict kroute from in_addr_t for nexthop and prefix to struct in_addrHenning Brauer
ok claudio
2004-01-23use log_addrHenning Brauer
2004-01-22use log_warnx and log_info. reclassify a few messages in the process and fixHenning Brauer
a few messages. ok claudio@
2004-01-22s/log_err/log_warn/Henning Brauer
it is like warn(3), nor err(3). so use a less confusing name.
2004-01-22an RTM_IFINFO message can mean a lot. it does not necessarily mean thatHenning Brauer
the status of the interface in terms of our nexthop validation changed; it might be something like a speed change that we don't care about. save the decided state for nexthop verificartion in struct kif, and only walk through the attached (connected) routes & report upwards if the state actually changed.
2004-01-18track interface type and baudrate as wellHenning Brauer
ok claudio@
2004-01-17keep track of interface link state and invalidate connected routes dependingHenning Brauer
on the interface in question if it has no link now, if you pull the network cable all nexthops beeing in a connected network on this interface get invalidated nicely. ok claudio@
2004-01-17keep & track interface names as well, not only indicesHenning Brauer
2004-01-17allow the interfaces as bgpd sees 'em to be queried via imsgsHenning Brauer
2004-01-17actually update interface flags in if_change()Henning Brauer
2004-01-17use the new RTM_IFANNOUNCE messages to track interface (de-)appearance,Henning Brauer
especially for cloneable devices like vlan/tun etc ok markus@ and claudio@ a while back
2004-01-14add soon-needed kif_remove()Henning Brauer
ok claudio@
2004-01-11KNFHenning Brauer
2004-01-11use bgpd_addr in the nexthop tree; change nexthop_add/_remove accordinglyHenning Brauer
ok claudio@
2004-01-11we need to have the address family set in bgpd_addr structs when theyHenning Brauer
contain anything worthwile...
2004-01-11when sending the nexthop status message, include the kroute that makes thatHenning Brauer
nexthop reachable. needed in the RDE for calculating the to-be-announced nexthop. ok claudio@
2004-01-11use struct bgpd_addr for nexthop and gateway in struct kroute_nexthopHenning Brauer
(and thus the nexthop messages between parent and RDE) ok claudio@
2004-01-11new message IMSG_CTL_SHOW_NEXTHOP: request/send lost of BGP nexthops andHenning Brauer
the result of their validity check
2004-01-09for IMSG_CTL_KROUTEs allow matching based on flags,Henning Brauer
add IMGS_CTL_KROUTE_ADDR to match the route for a given address ok claudio@
2004-01-09flag kernel routes whch are not conencted routes as static routes.Henning Brauer
that's what they are, and it makes matching on them easier.
2004-01-09get us a stateful imsg relaying framework, and the first receiver,Henning Brauer
IMSG_CTL_KROUTE, to have the kroute structs forming the fib sent to a control socket. ok claudio@
2004-01-09for RTM_IFINFO messages showing up on the routing socket do not everHenning Brauer
look into the first sockaddr structure after the msg header; does not contain what we expect there and caused messages to get missed in some cases
2004-01-08in kroute_insert, use knexthop_validate instead of hand-baking a slightlyHenning Brauer
optimized version of it
2004-01-08in knexthop_validate, always call kroute_detach_nexthop, notHenning Brauer
only in the no-match-found case. if we fina a match we are calling kroute_attach_nexthop anyway; and the match might be (in the common cases: will be, if existant at all) different for the existing attachment.
2004-01-08fix kroute_detach_nexthopHenning Brauer
2004-01-08our own internal route flags should have been an u_int8_t from the beginningHenning Brauer
on, not an int.
2004-01-08rename a few functions to further clarify thingsHenning Brauer
2004-01-08big reorganization.Henning Brauer
much nicer now. ok claudio@
2004-01-08KNFHenning Brauer
2004-01-08keep track of interface status. if an interface goes down mark all connectedHenning Brauer
routes that belong to it as invalid, and invalidate all nexthops belonging to it, and vice versa when it goes up "looks good" claudio@ on the version from yesterday night '-)
2004-01-07deal with messages on the AF_ROUTE socket in a multiprotocol friendlier way.Henning Brauer
this is also some preparation for v6 support. "looks good" claudio@
2004-01-07fix a check that catched too much... now connected routes that appearHenning Brauer
after startup (due to addition of an ip to an interface) are handled correctly.
2004-01-062004Henning Brauer
2004-01-05protect against trying to couple when we're already coupled to the fib,Henning Brauer
and log the coupling. same for decouple.
2004-01-02mark a few numbers U to please compilers; henning okTheo de Raadt
2003-12-30typos from davidHenning Brauer
2003-12-28typo in commentHenning Brauer
From: Dries Schellekens <gwyllion@ace.ulyssis.org>
2003-12-27styleHenning Brauer
2003-12-27consider the defualt route in kroute_match as well. it is a special case.Henning Brauer
2003-12-27keep a copy of the fd locally instead of passing it around all timeHenning Brauer
2003-12-27provide kroute_fib_couple and _decouple, pumping all bgp routes from theHenning Brauer
internal view to the kernel routing table respectively removing them all from the kernel routing table kroute_shutdown is now a simple wrapper to kroute_fib_decouple
2003-12-27implement "no fib-update" much coolerHenning Brauer
2003-12-27when a static route is deleted on that a nexthop depends, we re-checkHenning Brauer
wether there's another (bigger-prefix) non-bgp route suitable to reach the prefix, and if that is the case change the references over to the new route. if not, we need to invalidate the nexthop. unfortunately, we cannot just call kroute_nexthop_insert (whoch does these checks) again, as it does too much. factor out the matching and reference adding code from kroute_nexthop_insert to a new kroute_nexthop_checkmatch(), and make the surrpounding stuff cope. the kroute parts of "static route addition/deletion affects nexthop-valifity" work now.
2003-12-26detect when a newly added kernel route (non-bgp of course) matches a nexthopHenning Brauer
that is flagged invalid yet and make it valid, notify RDE etc
2003-12-26factor out common codeHenning Brauer
2003-12-2620 minutes debugging for a missinf return (0) at the end of a function,Henning Brauer
and gcc should have had complained... well.
2003-12-26by making kroute_dispatch_msg() and kroute_nexthop_add() return int insteadHenning Brauer
of void they can now report errors upstream and do not need to panic any more. so do that and handle the errors in bgpd.c in the vein that we at least can clean up before exit. there are no direct fatal() call in kroute.c now any more, nor any in bgpd.c after forking.