Age | Commit message (Collapse) | Author |
|
These may be leftovers from a crash or so and result in an strange
behaving bgpd parent process additionally it causes huge CPU loads because
of a linear list walk done on every insert. Code stolen from ospfd which
does the same thing since a long time ago. This is a temporary fix until
we have real routing priorities and all this PROTO1 flagging can be removed.
PROTO1 is not exclusive to bgpd but for correct operation we currently need
to enforce it.
OK because it is only temporary henning@
Found and fix tested by Sylwester S. Biernacki
|
|
if_msghdr, etc. they only share the first 3 fields, and then differ.
this leads to a bug in RTM_IFINFO handling. We did abort on
rtm->rtm_errno != 0,
but if_msghdr has no errno, so we look at something in the data part
instead. Surprising that this didn't bite us before!
So we must only do these checks for RTM_ADD/CHANGE/DELETE that actually
use rt_msghdr.
found whiel checking strange behaviour tony sarendal <dualcyclone@gmail.com>
saw, and then totally strange behaviour on my amd64 hackbox. claudio ok
|
|
when calculating the nexthop. Now only non BGP routes and not the default
route are used unless forced with the new config options
nexthop qualify via bgp
nexthop qualify via default
This change is required for complex setups e.g. where an additional IGP is
running. OK henning@
|
|
RTM_CHANGE. Until now it was not possible to get rid of these flags.
Until now a fib decouple, fib couple combo was needed to get rid from
blackholed routes. OK henning@
|
|
Sure henning@
|
|
not a C string and strlcpy() only works on C strings -- returns length of
the source. Found by tedu@ OK deraadt@ tedu@
|
|
is invalid. add check for these flags. shows up with v6, many reject routes
there. claudio ok
|
|
|
|
are e.g. created by the PMTU code and are removed after some time.
OK henning@
|
|
rtlabel_id2name() so call rtlable_unref() after that.
OK henning@
|
|
interface changes. support in the filter language and rde to come. claudio ok
|
|
bgpctl show fib output more logical, especially for INET6 because many
prfixes have the reject flag set. OK henning@
|
|
an own AF independent radix tree. So the passed sockaddrs are often smaller
than the actual AF specific struct, especially sockaddr_in6. So the crap
Henning saw in the mask was acctually the next struct sockaddr that was passed
in the routing message. So pass the struct sockaddr_in6 and compare only the
specified number of bytes (minus the offset of sin6_addr in the struct
sockaddr_in6). Amazing!..
OK henning@
|
|
|
|
|
|
the routing socket have crap in the lower bytes, so instead of
using a straightforward and rather simple algorithm to convert them to prefix
lengths we have to do quite some ugly manual fiddling... disgusting.
|
|
|
|
|
|
do it once and handle both families. claudio ok
|
|
|
|
up more. OK henning@
|
|
the buffer. While RTM_IFINFO starts with a struct if_msghdr RTM_NEWADDR
does not. In other words (struct sockaddr *)(next + sizeof(ifm)) is only
correct for RTM_IFINFO and not for RTM_NEWADDR. So move the ifm_type check
up else get_rtaddrs() would access memory outside of buf.
OK henning@
|
|
directly connected respectively all static routes. The list is auto-
matically adjusted as soon as a route changes.
OK henning@
|
|
OK henning@
|
|
from the kernel. That's what F_KERNEL is for. OK henning@
|
|
(that is a rare corner case in that context, but still)
|
|
there's some nastiness in the interface validation.
clean up by centralizing the checks in kif_validate().
claudio ok
|
|
|
|
|
|
Use IN_CLASSA_NET instead of hard coded 0xff000000
OK henning@
|
|
ok markus claudio
|
|
with the "show nexthop" messages, claudio ok
|
|
was unplugged from the beginning on...
correctly take interfaces' link state into account for nexthop verification
in all cases.
add a new function kroute_validate() that looks up the interface for a given
kroute via the ifindex and check its link state. use it in all cases instead
of hand-rolling the test. claudio ok
|
|
just for AF_LINK
|
|
|
|
RB_* macros I could fix the RB_HEAD calls there too... useless extra define,
nothingthat hurts much. stumbled over while hacking on, eh, something new,
claudio ok
|
|
places where needed. OK henning@
|
|
with this, if a neighbor is configured as dependent on carp0 for example,
the neighbor will remain in state IDLE as long as carp0 is not master.
once carp0 becomes master the session(s) depending on it immediately
go to CONNECT (or ACTIVE, if they're configured passive), reducing failover
time. claudio ok, with some input from ryan as well
|
|
|
|
|
|
always notify the RDE and not only if the nexthop was previously unreachable,
i.e. its validity changed.
found the hard way by Arvid Grtting <arvidg@netfonds.no>, claudio ok
|
|
similar to memcmp() and all other compare functions in bgpd. OK henning@
|
|
|
|
ok henning otto
|
|
blackhole/reject routes will be entered to the kernel for matching ones.
this is intended to be used with the Cymru Bogon Route Server Project
(http://www.cymru.com/BGP/bogon-rs.html) and similar services, claudio ok
|
|
|
|
within 127/8. inspired by a very bad example for bogon filters at the
cymru site, claudio ok
|
|
|
|
times I am getting this in now sow I don't do it a 7th time...
|
|
prefix tree changed form a hash table to a per AF RB tree.
OK henning@ some ideas are from Brent Graveland.
|