summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/kroute.c
AgeCommit message (Collapse)Author
2004-04-27crud stripping; henning okTheo de Raadt
2004-03-10on shutdown, explicitely clear the knexthop, kroute and kif tables, claudio okHenning Brauer
2004-03-10in kif_kr_insert and _remove, don't whine when we do not find an interfaceHenning Brauer
whom's index is 0. this means no interface and our faked route that protects the loopback network uses ifindex 0. claudio ok
2004-03-10remove an ugly hack from the time when we had no RTM_IFANNOUNCE messages:Henning Brauer
if kif_find() did not find a matchnit re-fetched the complete table from the kernel and retried. this is obsolete now, claudio ok
2004-03-04no ; after RB_PROTOTYPE / RB_GENERATEHenning Brauer
From: Andrey Matveev <andrushock@korovino.net>
2004-03-03plug a couple of little memory leaks in error paths that we hopefully neverHenning Brauer
reach - except for one missing free which was not in an error path. oups. at least in a function that is only called once ever in bgpd's lifetime. From: Patrick Latifi <pat at eyeo dot org>, thanks!
2004-02-29Make sure that the fib output is nicely sorted. Use ntohl to compareClaudio Jeker
IP addresses so the tree gets correctly populated. OK henning@
2004-02-07when connected routes show up at runtime we have to set ifindex in struct kifHenning Brauer
2004-02-07houps, fetchtable() had the default route special cased... bad.Henning Brauer
sin_len == 0 here too.
2004-02-07the sockaddr holding the netmask and advertised by rtm_addrs mightHenning Brauer
mave sa_len == 0 to indicate a mask of /0
2004-02-07sin_family in the sockaddr_n representing the netmask we sniffed on theHenning Brauer
routing socket is meaningless. so we're better off not checking it.
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