summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_decide.c
AgeCommit message (Collapse)Author
2009-08-06Implement the error handling as proposed in draft-ietf-idr-optional-transitiveClaudio Jeker
for optional transitive attributes. In short if the partial bit is set on an optional transitive attribute but the attribute fails validation ignore the attribute or mark the path as ineligible instead of killing the session with a NOTIFICATION. Tested, input and OK sthen, OK henning
2009-06-29Doh! Fix logic botch that disconnected the FIB from the Loc-RIB instead ofClaudio Jeker
making sure that other RIBs are not injecting routes into the FIB.
2009-06-06Only the main Loc-RIB should update the FIB for now. So introduce aClaudio Jeker
F_RIB_NOFIB flag and apply it on all RIBs that are not F_RIB_NOEVALUATE.
2009-06-06Only generate updates for peers that are member of the RIB that update isClaudio Jeker
comming from.
2009-06-01Instead of storing a pointer to the RIB head in the RIB element use thatClaudio Jeker
space for a flags field and the RIB id. In the end bgpd will be able to lock RIB elements and therefore make it possible to interrupt all tree walks.
2009-05-21Make it possible to turn off the decision process per RIB. This is mainlyClaudio Jeker
used for the Adj-Rib-In. Also initialize the Adj-Rib-In correctly and mark it a noevaluate.
2009-05-17Rework most of the RDE to allow multiple RIBs. This is mostly preparationClaudio Jeker
work by changing the way the RDE DB is built. struct prefix and struct pt_entry are simplified and extended with a rib_entry where the decision tree is run on. From now on a prefix can only reside on one particular RIB which simplifies the code a bit. Currently there are two fixed ribs (adj-rib-in and the local-rib) which needs to be made more dynamic in upcomming commits. This is work in progress, the RDE seems to work for me and sthen@ (no flames comming out of our testrouters but there is still a lot missing) Move into the tree to simplify developement -- henning@
2009-04-23Rework the way we handle announced networks. Instead of two freak rde_peersClaudio Jeker
use one that is less freaky. Merge bgpctl and config networks into one tree. First step of a larger change in the RDE and this goes now in to allow to move forward.
2008-05-08KNFHenning Brauer
2008-05-02Compare flags against the right flag field or else unexpected things mayClaudio Jeker
happen. The decision process failed to correctly mask looping pathes and in some szenarios even elected them as best route. *gulp* Found the hard way and fix tested by Christian, bsd (at) cleondra (dot) ch
2007-11-27Prefixes or actually pathes that would cause a rooting loops should not beClaudio Jeker
dropped when parsed but instead be added to the RIB marked as not eligible. So the decision process does not pick them up as a valid route. Tested and some ideas by Tony Sarendal (tony (at) polarcap (dot) org)
2007-05-11Various spelling fixes from Stuart Henderson.Claudio Jeker
2006-01-24Update comment to match reality.Claudio Jeker
2006-01-14Small step in supporting the Adj-RIB-In additionaly to the Local-RIB.Claudio Jeker
First step is to define two flags F_LOCAL and F_ORIGINAL. These flags are used to distinguish prefix in the Local-RIB and those in the Adj- RIB-In. Adapt prefix API and add additional checks so that no Adj-RIB- In prefixes get mistakenly selected. Currently no F_ORIGINAL prefixes are created but this may change soon. Looks good Henning.
2006-01-13Simplify evaluation process. Instead of checking the reachability of a prefixClaudio Jeker
at many different places do it once. This simplifies the logic and makes it easier to extend it for upcomming Adj-RIB-In addition. OK Henning.
2006-01-04If the decision process is turned of but a prefix is still active decrease theClaudio Jeker
active prefix counter.
2005-11-29Add a flags field to struct prefix which will be used shortly. Remove the peerClaudio Jeker
pointer so that the size does not grow. Adding 4 bytes to struct prefix would result in 64MB more memory usage on one of my systems.
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-04-12Introduce a per prefix weight. The weight is used to tip prefixes with equalClaudio Jeker
long AS pathes in one or the other direction. It weights a prefix at a very late stage in the decision process. This is a nice bgpd feature to traffic engineer networks where most AS pathes are equally long. OK henning@
2004-11-11New config statement "rde route-age [evaluate|ignore]". If set to evaluateClaudio Jeker
the best path selection will not only be based on the path attributes but also on the age of the prefix. This is an extension to the RFC. The default is ignore but previously it was implicitly set to evaluate. OK henning@ man page OK jaredy@ jmc@
2004-09-16minor KNFHenning Brauer
2004-08-06Monster diff to get one step closer to IPv6 support.Claudio Jeker
Cleanup path attribute handling. First of all kill struct attr_flags, all those infos are now in struct rde_aspath. Second move attribute parser functions into rde.c, rde_attr.c is shared between bgpd and bgpctl. Third reimplementation of the nexthop handling. Make it IPv6 ready and fix some major bug relating to "set nexthop". henning@ OK if it breaks nothing
2004-08-05Cleanup aspath specific functions and api. Mainly switch to a refcnt basedClaudio Jeker
allocation. This helps to save a bit of RAM. looks good henning@
2004-07-28Prefer the path with the lowest multi-exit discriminator (MED) not the biggest.Claudio Jeker
2004-06-22Cleanup. jajaja henning@Claudio Jeker
2004-04-26Cleanup the decision function and take the age of the entry into account.Claudio Jeker
Prefer older, more stable entries. OK henning@
2004-03-11Shutdown the RDE cleanly on exit. Plug some memleaks. OK henning@Claudio Jeker
2004-03-01Make it possible to diable the decision process. This is a feature only usefulClaudio Jeker
for route-collectors. OK henning@
2004-02-27remove unneded peer pointer in struct prefix and change a in_addr_t toClaudio Jeker
struct in_addr. OK henning@
2004-02-26Clean up comments and replace a if with a ENSURE because NULL nexthops areClaudio Jeker
illegal. OK henning@
2004-02-26Implement "enforce neighbor-as yes|no" which is by default on for ebgpClaudio Jeker
neighbors. While doing that check also that the nexthop is valid (not class D or E and not in 127/8 range). Kill some TODO and XXX and rename the british neighbour to neighbor as used everywhere else. OK henning@
2004-02-17Make sure that we add the new prefix to the prefix list or bad things willClaudio Jeker
happen. OK henning@
2004-02-04Move the update generation into a separate file. The update generation hasClaudio Jeker
nothing to do with the decision process. henning@ "conceptual ok ;-)"
2004-02-01Set sane default announce types according to the peer type. For IBGP useClaudio Jeker
announce all and for EBGP use announce self. OK henning@
2004-01-27use a struct bgpd_addr instead of sockaddr_in for peer_config->local_addr andHenning Brauer
->remote_addr for easier multiprotocol support ok claudio@
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-18spacingTheo de Raadt
2004-01-17Make it possible to announce own networks. In the RDE these prefixes areClaudio Jeker
attached to a pseudo peer and inserted like all other prefixes into the RIB. OK henning@
2004-01-13KNFHenning Brauer
2004-01-13Do not redistribute updates to ibgp peers. OK henning@Claudio Jeker
2004-01-13Implement a max-prefix and a announce none | self | all neighbor statement.Claudio Jeker
The first limits the number of sent prefixes per peer the latter controls which prefix we do annouce to the neighbor. Another looks good from henning@
2004-01-13Dump and send RIB to the neighbor if his session is comming up.Claudio Jeker
Now bgpctl neighbor <IP> up does work as expected. Looks good from henning@
2004-01-13Do not send routes back to sender as per rfc. OK henning@Claudio Jeker
2004-01-12Nexthop announcement fixup. There are different rules for ibgp and ebgp.Claudio Jeker
For ibgp the nexthop is normally passed unmodified unless the nexthop is equal to the remote peer ip. To ebgp peers the nexthop is changed to the local session ip unless the remote peer ip and the nexthop are on the same subnet. OK henning@
2004-01-11Move all struct in_addr to either struct bgpd_addr or in_addr_t whicheverClaudio Jeker
is more appropriate. The rde uses now in most cases struct bgpd_addr. OK henning@
2004-01-11KNFHenning Brauer
2004-01-10Implement as path prepends. At least one prepend is needed for ebgpClaudio Jeker
neighbors. Fix a bug in the update generation. If no path attributes are available e.g. a packet with only withdraws we need to set (and write) the bgp path attribute field to zero. With this change we are able to send valid updates to our neighbors with one exception: the nexthop field which needs to be changed for ebgp neighbors. OK henning@
2004-01-10RDE update generation. First we queue all updates and withdraws on a perClaudio Jeker
peer basis. A queue runner will dequeue and package those messages to valid bgp UPDATE messages and send them to the SE. Not yet done is per peer type attribute handling (like aspath prepends and nexthop modifications) and the queue runner could be a tad smarter. All in all this gives us a good starting point for the missing parts. OK henning@
2004-01-07Make sure that kroute updates for the FIB are only sent if there is aClaudio Jeker
change. Until now rde_send_kroute tried to send a IMSG_KROUTE_DELETE if old and new prefix where ineligible. OK henning@
2004-01-062004 OK henning@Claudio Jeker