summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
2010-02-11Not knowing a AFI/SAFI pair in the MP capability is no reason to failClaudio Jeker
a session. Just print a warning and move on since both side need to announce a pair to use it. Found and OK sthen@
2010-02-11We need to load the config before kr_init() is called or fib-update isClaudio Jeker
ignored. Found and fix tested by Elisa Jasinska.
2010-02-11While looking through this code I figured out that set nexthop self andClaudio Jeker
no-modify are not supported for MP protocols like IPv6. Add support for those and while testing find another bug in the same region. Inverse the check for the return value of memcmp() -- we're interested in equality. Until now IPv6 was running with an implicit set nexthop self on all iBGP sessions. Oups. set nexthop stuff is OK when tested henning@ and sthen@
2010-02-09Don't hardcode the AID to AID_INET6 when sending MP EoR updates.Claudio Jeker
This will allow AID_VPN_IPv4 to do EoRs as well.
2010-02-08Unbreak IPv6 local address lookups. Some idiot aka me optimised a loop andClaudio Jeker
because of that either the IPv4 or IPv6 local address was not set. Because of this prefixes were sent out with all zero nexthops.
2010-02-08It is enough that peer->capa.mp[i] is non zero. It does not need to be 1.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@
2010-01-11Do not crash when starting up with a bad config file. Check thatClaudio Jeker
conf.listen_addr is actually valid before deref.
2010-01-11lex <=, >=, !=, and >< into a single token for correctness and to reduce theTheo de Raadt
lookahead in the parser ok henning
2010-01-11Make sure we do not add trailing garbage while parsing a prefix that has aClaudio Jeker
prefixlen that is not a multiple of 8. Found while reading the RFC. OK henning@
2010-01-10Generate a EoR marker in the update list instead of sending it independentClaudio Jeker
of the actual update dump. This will get us the right barrier and the EoR is no longer sent way before the actual dump. Currently a nop since graceful restart is turned off (unless you have announce restart yes in the config). put it in henning@
2010-01-10Switch rib_dump() to use AID instead of AFs. OK henning@Claudio Jeker
2010-01-09Fix fatalx message.Claudio Jeker
2010-01-05Make sure that all important config variables are synced on a reload inClaudio Jeker
the SE. This got more important since we use the reload all the time now. Found out the hard way and fix tested by Laurent CARON
2009-12-31Instead of passing the config via arguments to the childs on bootup issueClaudio Jeker
a config reload as first step in bootup. This allows childs to start with an empty config and a lot of special cleanup code can bite the dust. Testing by myself and sthen@ with a few configs (more testing welcome). Seems like a good idea henning@ & sthen@
2009-12-18Merge rde_filter_community() with community_match() and kill a uselessClaudio Jeker
indirection.
2009-12-17Fix formatstring in printf.Claudio Jeker
2009-12-16Implement "set ext-community [delete] subtype key:value" to set and deleteClaudio Jeker
extended communities as specified in RFC 4360. No matching implemented yet and stuff like * and neighbor-as are neither supported but will be soon. Looks good henning & sthen, manpage fixed by jmc
2009-12-14addr2sa() will return NULL for AID_UNSPEC and pfkey_send() may end up withClaudio Jeker
one of the src/dst addrs as AID_UNSPEC. So we need to check for NULL before copying. Fixes a crash seen with tcp-md5 enabled peers.
2009-12-09parsecommunity() always works on a struct filter_community. So pass aClaudio Jeker
pointer to the struct instead of two int pointers.
2009-12-09parsecommunity() does not allow to set unknown well-known communities.Claudio Jeker
So there is no need to check that again. Switch a USHRT_MAX to COMMUNITY_WELLKNOWN to make the compare clearer, the values are the same.
2009-12-08porcesses -> processesJonathan Gray
2009-12-08Big AID change part two. This changes the mp capability into an array ofClaudio Jeker
flags. This makes a lot of code much easier since the comparison is now trivial. Additionally calculate the negotiated capabilities for a session in the SE and pass that and only that to the RDE. This makes the decisions in the RDE a lot easier. OK henning@
2009-12-06Doh, switch src and dst in memcpy calls or the wrong thing gets copied.Claudio Jeker
For some reasons memcpy has the argument reversed - grmbl. Found the hard way by Insan Praja.
2009-12-04Remove a hardcoded AF_INET6 with the correct use of the current AID.Claudio Jeker
Found the hard way by Laurent CARON (lcaron at unix-scripts info)
2009-12-03Stop the IdleHold timer when going to idle state. This makes it a bitClaudio Jeker
more clear that going to idle state will stop everything and it is necessary to start the IdleHold timer to restart sessions. OK henning@
2009-12-03A bgpctl nei XY clear should not restart neighbors that are administrativlyClaudio Jeker
down. So after a bgpctl reload clearing a neighbor will bring that neighbor into the configured state (in this case down). OK henning@
2009-12-03Only log if there is a chance that the session may come up if the neighborClaudio Jeker
is administrativly down save the electrons for more important messages. After a short discussion with Elisa Jasinska from ams-ix. OK henning@
2009-12-02log_warn() consistency.Michael Knudsen
`OK' claudio
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-11-26support for set origin; based on an initial diff fromHenning Brauer
Sebastian Benoit <benoit-lists at fb12 dot de> who also tested this version claudio ok
2009-11-11Plug two memory leaks in error pathes. Found by parfait. OK henning, jsgClaudio Jeker
2009-11-02Implement IMSG_CTL_LOG_VERBOSE similar to ospfd. Even though bgpd has almostClaudio Jeker
no log_debug() it makes more sense to make all routing daemons behave the same.
2009-10-30Routers with "transparent-as yes" set should behave more like iBGP ones.Claudio Jeker
In this case export the MED to all peers no matter what. It is no longer needed to do the set med +0 hack. OK henning@
2009-10-28tweak previous;Jason McIntyre
2009-10-28Free correct buffer.Claudio Jeker
2009-10-28Document the "rib" filter parameter to specify the rib a rule applies to.Claudio Jeker
2009-10-26Add RFC2545 to the list of standarts supported by bgpd.Claudio Jeker
2009-10-26Better error handling when doing mrt dumps (e.g. when there is no more spaceClaudio Jeker
on the disk). Before the SE spinned and the RDE may even crash in these events. Found by Elisa Jasinska. OK henning@
2009-10-22fix two typos in documentation.Igor Sobrado
ok claudio@
2009-10-13Forgot this bit when disableing restart capability.Claudio Jeker
2009-10-13Disable graceful restart for now. The EOR marker is sent in the wrong placeClaudio Jeker
and fixing this is not a two liner. Will be enabled again when I found out how to fix this.
2009-10-12Only dump AFI/SAFI pairs that are active. For IPv6 check the announced andClaudio Jeker
received MP capability for IPv4 this does not work when announce capabilities no is set so check if announce IPv4 none was set in the config. The capabilities code needs rework since those checks are very error prone. With this we don't leak unneeded EOR markers for other AFI/SAFI pairs.
2009-10-12Send correct EOR updates. peer_send_eor() does not accept the AFI_ALL andClaudio Jeker
SAFI_ALL shortcuts. This should fix issues with Juniper boxes that started when I enabled more capabilities by default. Fix and report by rivo nurges (rix at estpak dot ee) Thanks.
2009-10-08remove an unused variable, ok claudio@ henning@Stuart Henderson
2009-10-06Add config knobs to enable/disable individual BGP capabilities per neighbor.Claudio Jeker
e.g. announce refresh no. With this be more aggressive when announcing our capabilities and enable all of them by default. If there are troubles with some neighbors adding the following config lines should bring you back to the old behaviour: announce refresh yes # was already on by default announce restart no announce as-4byte no # was only set on sessions to peers with 4byte AS nums OK henning and sthen
2009-10-05Load prefixes into new created RIBs at reload time by walking over theClaudio Jeker
Adj-RIB-In. This only works correctly when softreconfig in is enabled (which is the default). This is needed to allow dynamic creation of additional RIBs. OK henning@
2009-10-05draft-ietf-idr-restart is RFC 4724 since quite some time.Claudio Jeker
Fix function name in a warning message.
2009-09-30carp_demote_ioctl() can handle more then +/-1 steps so there is no need toClaudio Jeker
loop in the shutdown case. OK henning@
2009-09-28Fix typo (creat/create)Stuart Henderson