summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_prefix.c
AgeCommit message (Collapse)Author
2018-09-04Introduce inet4applymask() which does the same as inet6applymask() andClaudio Jeker
can be used instead of doing direct fiddling around with struct in_addr. Use it in a few cases where it makes the code more similar between INET and INET6 case. OK denis@
2017-01-24sync log.c from relayd et al to bgpd.Sebastian Benoit
there is still a little difference regarding handling of the verbosity value that will be handled later. ok claudio@ florian@
2010-03-26pt_add() is not allowed to fail, caller expects this behaviour.Claudio Jeker
2010-01-13Add support for BGP MPLS VPN aka RFC 4364. This is only the RDE part soClaudio Jeker
that it is possible to use OpenBGPD as a route-reflector for VPNv4. Some clean up of the BGP MP code so that multiple protocols are easier supported. kroute/kernel support not yet done but comming. OK henning@, reyk@
2009-12-01Use an artificial address family id in struct bgpd_addr and almost everywhereClaudio Jeker
else. Adds conversion functions to map AFI/SAFI and the Unix AF_ values from and into AID used in bgpd. This is needed to support things like MPLS VPN and other upcomming changes that need to play a lot with AFI/SAFI pairs. Mostly mechanical change, henning@ has no particular issues with this. Must go in so that I can continue working.
2009-05-30Only use a single tree for all address families. There is no need for multipleClaudio Jeker
trees and the rib trees are also not split. Looks good henning@
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-26Unused defines from a time long long ago.Claudio Jeker
2009-04-19Correct function name in log_warnx().Claudio Jeker
2007-05-11Various spelling fixes from Stuart Henderson.Claudio Jeker
2007-02-22KNFHenning Brauer
2007-01-26Massiv rework of the control imsg flow. Main changes:Claudio Jeker
- dedicated pipe between the SE and the RDE for control messages - restartable RB tree dumps in the RDE - queuing limits both in the SE and RDE The result is a dramatic decrease of memory consumption on operations like bgpctl show rib. Previously all messages where first stored in the RDE then passed to the SE where they got queued in case bgpctl was not fast enough. Now only a small number of messages is generated and passed to the SE and the SE has an additional limit instead of acting like an infinite buffer. Without this the bgpd on bgpd.networx.ch would not survive a single minute. looks good henning@
2006-01-03Track some (memory) statistics in the RDE. Accessible via bgpctl.Claudio Jeker
2004-11-11Don't hardcode the prefix table to the IPv4 one, especially if there isClaudio Jeker
already code to select the correct tree by AF.
2004-08-05comapring -> comparing noticed by brad@.Claudio Jeker
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-03Cleanup and remove some ENSURE. OK henning@Claudio Jeker
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-03-11KNFHenning Brauer
2004-03-11Shutdown the RDE cleanly on exit. Plug some memleaks. OK henning@Claudio Jeker
2004-03-02Framework for rib lookups by prefix. OK henning@Claudio Jeker
2004-02-09replace a bunch of u_long by u_int32_tHenning Brauer
2004-01-17KNFHenning Brauer
2004-01-16missing #includeHenning 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-062004 OK henning@Claudio Jeker
2003-12-26when this project started and i added the fatal() function, I made it takeHenning Brauer
the error number as parameter instead of accessing errno, because in one place the error number was not in errno but fetched from a socket. now, of course it makes much more sense to just set errno to the error number just fecthed in this one place instead of having hundreds of fatal() calls all transfer the errno round and round and round... fix this, and also provide a fatalx, which does not care for errno and doesn't invoke strerror. oh, btw, in the place where we fetch the err # from the socket, we don't call fatal anymore anyway...
2003-12-24typos in comments, from jaredHenning Brauer
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-19knfTheo de Raadt
2003-12-17welcome, bgpdHenning Brauer
started by me some time ago with moral support from theo, the proceeded up to the point where the session engine worked correctly. claudio jeker joined then and did a lot of work in the RDE. it is not particulary usefull as application right now as parts are still missing but is imported to enable more people to work on it. status: BGP sessions get established fine, OPEN messages and then KEEPALIVEs exchanged etc. session FSM works fine; NOTIFICATIONs are handled fine, and all connection drops etc I provoked get handled fine. Incoming UPDATE messgages are parsed well and the data entered to the RIB, the decision process is not yet there, neither is outgoing UPDATEs or sync to the kernel routing table. not connected to the builds yet.