summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
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
2009-09-22Update capability code to follow RFC 5492. Unlike before multipleClaudio Jeker
capabilities are now encoded in a single capability option. RFC conforming BGP implementations must be able to parse both the old and the new way of the encoding (most still seem to use the old one). bgpd still accepts both ways on reception. OK henning, sthen
2009-09-15Enclose repeated buffer draining code in a new msgbuf_drain()Jacek Masiulaniec
function, which is additionally exported for use by others. It will be needed by smtpd's SSL module when the SMTP client code is changed to replace libevent's evbuffers with our msgbuf_* API. ok gilles@ henning@ guenther@ eric@
2009-09-04Make sure that a proper syntax error is produced when something else thenClaudio Jeker
yes or no is used in a yes/no token. OK henning
2009-09-04Use the address familiy of the neighbor IP to decide which MP type to use.Claudio Jeker
IPv4 session will still default to only announce inet unicast but now IPv6 session will by default use announce inet6 unicast. The defaults can be overridden on groups and in the neighbor itself but this new behaviour is way more sane then the old one. OK henning, sthen
2009-09-03Use correct destination in memcpy(). Fixes PR6218, OK henningClaudio Jeker
2009-09-02Implement all of RFC 4486 BGP Cease Notification Message Subcodes.Claudio Jeker
The other side should now see why a session was dropped. e.g: bgpd: ... received notification: Cease, administratively down OK henning
2009-08-31Use UINT_MAX instead of ASNUM_MAX and get rid of this mostly useless define.Claudio Jeker
2009-08-31Fix mandoc magic to make the command render correctly.Claudio Jeker
2009-08-21Fix for PR6213, peers with 4-byte AS numbers were unable to connect to aClaudio Jeker
template neighbor because the AS was set before the 4-byte one was parsed. While there force enforce neighbor-as to no for iBGP peers. Found and fix tested by Matthias Cramer (cramer (at) swissix.ch) OK henning@, sthen@
2009-08-08Make imsg_clear close and free any fds in the received fd queue as well asNicholas Marriott
freeing the msgbuf. While here also remove an unnecessary while loop. ok eric pyr
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-08-03Make announce "self" work like all others (self is a bit special becauseClaudio Jeker
it's a keyword but "self" is not). OK henning@
2009-07-24RECONF_REINIT is a bad initial reconf_action state for templates.Claudio Jeker
getpeerbyip() initializes the full peer and so there is no need to do the work a second time -- especially since there it was already in the wrong state resulting in strange behaviour. OK henning@
2009-07-23make buf_write() behave like msgbuf_write(): send out only theEric Faurot
bytes that were filled, not the whole buffer. ok pyr@ gilles@
2009-07-23Send the used kroute along with the nexthop information. This allows usClaudio Jeker
to show all necessary information in bgpctl show next. OK henning@