summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.h
AgeCommit message (Collapse)Author
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-05As usual cleanup on exit. OK henning@Claudio Jeker
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-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-30Add new announce type "default-route" which will only announce the defaultClaudio Jeker
route to the specified neighbor. Idea and OK henning@
2004-07-28The default localpreference is 100 and not 0. Found and ok henning@Claudio Jeker
2004-07-13fix some typosJared Yanovich
ok henning otto
2004-07-05implement "set nexthop blackhole" and "set nexthop reject"Henning Brauer
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
2004-06-24First step at multiprotocol support, only partially done.Claudio Jeker
OK henning@
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-20at least somewhat consistently name the TAILQ_ENTRYs... this confused meHenning Brauer
more than once
2004-05-21RFC 2796 bgp route reflector support. This is very useful in conjunctionClaudio Jeker
with templates. looks good, go for it henning@
2004-05-17extend filter language to allow basic setting of COMMUNITIES attribute.Damien Miller
ok claudio@
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-10move the API_* and SAFI_* defines to where they belongHenning Brauer
2004-03-11Add basic support for communities. Currently it is only possible to filterClaudio Jeker
on communities, e.g match from any community 24640:* set localpref 666 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-26show rib infrastructure. At least full dumps and per as dumps. Per prefixClaudio Jeker
dump need some more work. 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-19Add support for basic filters. Nothing optimized and it has some issues butClaudio Jeker
this is a huge step forward. OK henning@
2004-02-18Correctly handle parse errors in aspath and prefixes. Also do input aspathClaudio Jeker
loop detection. OK henning@
2004-02-18Bring the path attribute parsing on big step closer to the RFC.Claudio Jeker
Check that evry attribut is only allowed once and ensure that the mandatory attributes are present. no objections henning@
2004-02-16Basic aspath match function needed for filters and the "show rib" bgpctlClaudio Jeker
command. OK henning@
2004-02-16Add basic functions to print aspath in human readable format. OK henning@Claudio Jeker
2004-02-16Make the path attribute handling more RFC conformant. Also move theClaudio Jeker
parser to rde_attr.c where it belongs. Still missing: better aspath loop detection (should be done afterwards) and some basic error checking for optional attributes. OK henning@
2004-02-09replace a bunch of u_long by u_int32_tHenning Brauer
2004-02-02Somehow I missed this peace in one of my last commits. OK henning@Claudio Jeker
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-13Better update error handling. Ensure that the session goes down andClaudio Jeker
ignore all queued updates after an error. Looks good 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-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-11Add to the IMSG_SESSION_UP message the local and remote address of theClaudio Jeker
peer session. This is needed to set the correct nexthop address in outgoing bgp UPDATES. OK henning@
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.
2003-12-26move struct nexthop definition to rde.hHenning Brauer
2003-12-25RDE part of the nexthop verification puzzle.Claudio Jeker
The RDE just tracks the nexthop IPs and reacts on nexthop messages from the parent. ok henning@
2003-12-23Send updates to the main process so they can be added to the kernelClaudio Jeker
routing table. OK henning@
2003-12-21overhaul the write buffering code.Henning Brauer
introduce msgbuf API and bundle all info needed for the write buffers in a struct msgbuf. also switch to a write queue per handled connection (each bgp session, each pipe) instead of one big one. fixes some subtle problems and is overall nicer. ok claudio@
2003-12-21yet more from the castathon; most aspath functions where accessing non-Claudio Jeker
aligned memory (u_int16_t) therefor crashed the RDE on my sparc64. All buffer specific functions use now void * instead of u_char * so most cast are now history. Tested on sparc64 and i386. OK henning@
2003-12-19knf & 64-bit cleanup; henning okTheo de Raadt
2003-12-18First step for configuration merges in the RDE. Currently this will notClaudio Jeker
work correctly because the peer id changes on config reload. The code in the RDE per se should be OK.