summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
2005-09-21Make sure that "updates" with only MP withdraws (MP_UNREACH_NRLI) stopClaudio Jeker
processing after the MP withdraw block. OK henning@
2005-09-21when the route to a nexthop is a reject or blackhole route, the nexthopHenning Brauer
is invalid. add check for these flags. shows up with v6, many reject routes there. claudio ok
2005-09-20allow "show rib" to be limited to an address family tooHenning Brauer
2005-09-20let "bgpctl network show" print v6 addresses correctlyHenning Brauer
2005-09-19implement fast reconnectsHenning Brauer
when a peer drops to IDLE, we have to force him in IDLE for some time to prevent fast flapping. however, the forced idle time is annoying when the connection could be re-established immediately, i. e. bgpctl nei $peer clear or similar. implement an error counter per peer, increased every time we receive a notification. when we are in state IDLE and get a connection from the peer in question, check if the error counter is 1 or smaller. if so, change state to active and accept the connection, otherwise keep the current behaviour and reject the connection. the error counter gets scaled back by the IdleHoldResetTimer that scales the IdleHoldTime back as well
2005-09-19KNFHenning Brauer
2005-09-08fix reloads where capbilities changeHenning Brauer
when a new peer in initialized, the configured capailities are copied. this copy is modified as part of the capabilities negotiation. now if teh session drops we want to re-negotiate capabilities at the next establishment, last not least because the configured capabilities might have changed in between (that's how I stumbled over it, added v6 shitz) so copy the configured capabilities over every time a session goes to IDLE state, unless the reason is EVNT_RCVD_OPEN, because then we're in capabilities negotiation.
2005-08-11two missing EINTR here tooHenning Brauer
2005-08-10- comapared -> comparedJason McIntyre
- correct word order - grammar
2005-08-10Pass the correct peer to rde_apply_set(). rde_apply_set() needs to knowClaudio Jeker
the peer where the prefix came from so that prepend-neighbor works. Extend rde_filter() and make sure that the correct peer is passed. Until now most cases resulted in a NULL peer causing a nasty crash that was found by David Ulevitch. OK henning@
2005-08-09Introduce new route decision tunable "rde med compare (always|strict)".Claudio Jeker
If set to always the med will also be compared between different AS. The default is strict which is the way the RFC specifies it. OK henning@
2005-07-29Debugging session at WTH. Fix many bugs in the IPv6 support -- some copy pasteClaudio Jeker
and some more obscure ones. With this is it possible to run IPv6 sessions between two bgpd. OK if it does not break IPv4 hummpa barman Henning
2005-07-29Add another piece to the IPv6 puzzle. This time code to generate MP updates.Claudio Jeker
Does not affect IPv4 minimaly tested for IPv6 because we still don't have an IPv6 capable neighbor. henning@ ya
2005-07-28document the v4/v6 safi control buttonsHenning Brauer
(and of course it is marc balmer who's spreading the kaesefondue here, not marcm) claudio ok
2005-07-28print the v4/v6 safi announce stuff, from wthHenning Brauer
2005-07-28keywords have to be sorted, and I can't sort properlyHenning Brauer
2005-07-28allow the to be announced SAFIs to be specified per peer, that is part of theHenning Brauer
multiprotocol shitz claudi needs this to proceed with v6 stuff in the RIB, print stuff and manpage later from whatthehack, claudio ok, marcm schnell schnell schnell
2005-07-24we must start the ConnectRetry timer before calling session_connect inHenning Brauer
all cases, since session_connect can in turn cause events that cause state changes in the FSM that reset the ConnectRetryTimer. debugged with Leen Besselink <leen@consolejunkie.net> who was seeing errnously running ConnectRetryTimers in a case with localhost connections
2005-07-18fix a block that was indented too far.David Gwynne
ok claudio@, king bula sez ok
2005-07-18minor nits in session.c, add an additional nconf == NULL check and switchClaudio Jeker
some fatal()s to fatalx(). All done by dlg@. OK henning@
2005-07-14free commitz from pascoes kitchen. fix an error messageDavid Gwynne
ok henning@
2005-07-04New function filterset_cmp() used two compare two struct filter_set forClaudio Jeker
equality. This function is a bit more complicated than a memcmp() because there are types that need to be considered equal e.g. ACTION_SET_MED and ACTION_SET_RELATIVE_MED. Also ACTION_SET_COMMUNITY and ACTION_SET_NEXTHOP need some special care. OK henning@
2005-07-04Switch some parser rules from "string" to "STRING". "string" is to greedyClaudio Jeker
and hides possible typos. e.g. set { rtlabel foo localperf 100 } was a valid syntax but the result was a route label with name "foo localperf 100". OK henning@
2005-07-01More spacesClaudio Jeker
2005-07-01tab after spaceClaudio Jeker
2005-07-01Switch filter_sets form SIMPLEQ to TAILQ, needed for upcomming stuff.Claudio Jeker
2005-07-01The newly introduced function filterset_free() existed already asClaudio Jeker
rde_free_set(), I just missed it when I was looking for it. Kill rde_free_set() and use the more correct filterset_free() from now on.
2005-07-01Make the pftable filter set use the name2id "cache" like the route labels.Claudio Jeker
This saves 14 bytes per aspath. OK henning@
2005-06-29rtlabel support via filter sets. Just use "set rtlabel foobar" in filtersClaudio Jeker
network and neighbor statements and the routes are labeled accordingly. While doing that fix some mem-leaks by introducing filterset_free() and remove the free on send option of send_filterset(). This took a bit longer because we need to carefully track the rtlabel id refcnts or bad things may happen on reloads. henning@ looks fine
2005-06-28Try to fit 0x200 into an u_int8_t is not so clever. Pass the flags asClaudio Jeker
u_int16_t so that "bgpctl show rib 4/8 all" works again.
2005-06-25name2id prototypesHenning Brauer
2005-06-25Make the name2id/id2name code generically usable. This will be needed byClaudio Jeker
the upcomming filter rewrite. OK henning@
2005-06-24Do not automaticaly announce routes that have RTF_DYNAMIC set. These routesClaudio Jeker
are e.g. created by the PMTU code and are removed after some time. OK henning@
2005-06-16use prefixlen2mask() instead of doing the bitshifting by hand; fixes theHenning Brauer
zero prefixlen case (32 bit shift on 32 bit val -> undefined result) spotted by Moritz Grimm and otto
2005-06-14Don't unref something that is used later. send_rtmsg() will callClaudio Jeker
rtlabel_id2name() so call rtlable_unref() after that. OK henning@
2005-06-13route label support, kroute part and ID allocator as well as the internalHenning Brauer
interface changes. support in the filter language and rde to come. claudio ok
2005-06-13realloc(3) correctly. Do not adjust the variable describing how much memoryClaudio Jeker
has been allocated until one knows the allocation has been successful.
2005-06-10Make sure that the ATTR_EXTLEN flag is unset if the attribute length isClaudio Jeker
smaller than 255 bytes.
2005-06-10Introduce attr_optlen() to get the total lenght of an optional attributeClaudio Jeker
plus header. Soon needed.
2005-06-10Simplify show rib upcalls. Kill one mostly unused function.Claudio Jeker
2005-06-09Change the "network connected|static" statements to "network inet|inet6Claudio Jeker
connected|static" so that it is possible to distinguish between IPv4 and IPv6 addresses. "network connected|static" is considered deprecated but will be supported as an alias for "network inet connected|static" for some time (one release) to simplify upgrades. This also solve a nasty crash when using "network connected". OK henning@
2005-06-09If there is a problem to connect to a remote peer, do the same log dampingClaudio Jeker
as for other errors. Save the errno and only print a message if the errno changed. So the log is not filled with "socket error: Connection refused" when the peer is not yet listening on that address. OK henning@
2005-06-07Set the reject and blackhole flags for kernel routes too. This makes theClaudio Jeker
bgpctl show fib output more logical, especially for INET6 because many prfixes have the reject flag set. OK henning@
2005-06-07Fix the mask2prefixlen6() function once and for all. Netmasks are stored inClaudio Jeker
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@
2005-06-06allow show fib to be limited to inet or inet6 families, claudio okHenning Brauer
2005-06-05on CTL_KROUTE requests, send back both v4 and v6 routesHenning Brauer
2005-06-05work around another disgusting ugliness in v6: the netmasks we get onHenning Brauer
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.
2005-06-05make log_in6addr actually work correctly - it is astounding how ugly thingsHenning Brauer
are in the v6 world. the lower 16 bits of the scope ID are embedded in byte 3 and 4 of the address for link-local addresses... sometimes, at least. these btes have to be 0 by definition, so we need to fiddle the scope ID out and reset those bytes to 0. embedding the scopeID like that is the most disgusting hack I have seen in a while.
2005-06-05provide cleartext messages for the cease suberror codesHenning Brauer
2005-06-04when the max-prefix limit was exceeded generate a STOP event; we do notHenning Brauer
want the session to be restarted automagically in that case.