summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
AgeCommit message (Collapse)Author
2004-11-10prefix_write() works also for IPv6. OK henning@Claudio Jeker
2004-11-10Remove no longer needed code. OK henning@Claudio Jeker
2004-08-17Always update prefix timestamp even if nothing has changed. Without thisClaudio Jeker
networks disappear after reload. OK henning@
2004-08-13Fix minor issues with IPv6 dumps and add a function for dumping the RIB tableClaudio Jeker
protocol independent. This new dump format is not (yet) supported by the mrtd route_btoa tool. OK henning@
2004-08-12Just ignore RFC2545 and the silly idea of using link local addresses asClaudio Jeker
nexthop. This makes the code a lot simpler. OK henning@
2004-08-10switch nexthop in struct filter_set form struct in_addr to struct bgpd_addrClaudio Jeker
OK henning@
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-05Get rid of some statistics stuff that is no longer needed but helped in theClaudio Jeker
beginning. OK henning@
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-08-05struct prefix has a pointer to the peer so use it everywhere directly insteadClaudio Jeker
of the detour via aspath.
2004-08-05rename and move prefix_equal() to prefix_compare() which returns -1, 0, 1Claudio Jeker
similar to memcmp() and all other compare functions in bgpd. OK henning@
2004-07-05fix a few KNF falloutsHenning Brauer
2004-06-22Cleanup. jajaja henning@Claudio Jeker
2004-06-22Make the RDE IPv6 ready missing is the message handling. The internalClaudio Jeker
prefix tree changed form a hash table to a per AF RB tree. OK henning@ some ideas are from Brent Graveland.
2004-06-22introduce kroute6, which will be used to build a seperate v6 tableHenning Brauer
(smashing them into the v4 table would raise the memory requirements far too much), and make kroute_nexthop (where we are not under such memory pressure, you don't have a hundred thousand nexthops) v4/v6. change existing callers to use the v4 part, claudio ok
2004-05-08KNFHenning Brauer
2004-05-07add a filter option to dump prefixes learned in UPDATEs into a PF table,Damien Miller
intended for building realtime BGP blacklists (e.g. with spamd); ok claudio & henning
2004-04-30remove MAX_PREFIX_PER_AS debug gunk, claudio djm okHenning Brauer
2004-04-28Pointer that are used later in the code should be initalized. Fixes a crashClaudio Jeker
noticed by Henning. OK henning@
2004-03-11Shutdown the RDE cleanly on exit. Plug some memleaks. OK henning@Claudio Jeker
2004-03-05Plug some memory leaks in rde. Based on a patch by Patrick Latifi.Claudio Jeker
Added attr_move() so that we can copy the attribute before calling the filter. path_update() will now use the passed attribute so it can't be simply reused. OK henning@
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-27Cleanup no functional changes. OK henning@Claudio Jeker
2004-02-27It is possible to end up in prefix_add with a prefix that needs to be moved.Claudio Jeker
This caused troubles with show rib because of an ENSURE. OK henning@
2004-02-26show rib infrastructure. At least full dumps and per as dumps. Per prefixClaudio Jeker
dump need some more work. OK henning@
2004-02-19Add support for basic filters. Nothing optimized and it has some issues butClaudio Jeker
this is a huge step forward. OK henning@
2004-02-19Make the code more portable. Add some missing header files and make the useClaudio Jeker
of the queue(3) makros more portable. OK henning@ some time ago.
2004-02-09replace a bunch of u_long by u_int32_tHenning Brauer
2004-02-04Move BGP path attribute handling functions in a own file. henning@ conceptual okClaudio Jeker
2004-02-02spacesTheo de Raadt
2004-02-02Fix bug in the decision process. The decision process is unable to directlyClaudio Jeker
detect changes of the active prefix. This bug is only triggered when a nexthop changes state. While doing that clarify prefix_move a bit. OK henning@
2004-02-02Use correct struct in sizeof for calloc. OK henning@Claudio Jeker
2004-01-27move strict kroute from in_addr_t for nexthop and prefix to struct in_addrHenning Brauer
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-13Fix the aspath_* functions to allow empty aspath. A empty aspath is oneClaudio Jeker
with len 0. Needed vor ibgp and local network announcements. OK henning@
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-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-11KNFHenning Brauer
2004-01-11set address family...Henning Brauer
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-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-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-062004 OK henning@Claudio Jeker
2003-12-30typos from davidHenning Brauer
2003-12-26"when you try to be very smart, something breaks horribly"Henning Brauer
zap aspath->state, which was a copy of aspath->nexthop->state, for a tiny little bit faster access. tho, it happened what had to happen, they ran out of sync. it's just not worth it. also add a missinf LIST_INIT.