summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2009-03-26argh, do not reuse the global trans_as flag to be applied to the peerHenning Brauer
specific or we had to widen the peer specific flags without need. defien PERRFLAG_TRANS_AS instead and use that
2009-03-22make transparent-as yes|no settable peer neighbor with the global settingHenning Brauer
acting as default. per-neighbor requested by arnold nipper @ decix, ok claudio
2009-03-19First big chunk of mrt rewrite. Simplifies code hopefully and fixes tableClaudio Jeker
dumps that were wrong because of the 4byte AS support. Dumps I took seemed to work so far. "Put it in" henning@
2009-03-19Implement a attr_writebuf() function that works on a struct buf instead ofClaudio Jeker
a pre allocated piece of memory. Will be used by newer mrt code. OK henning@
2009-03-18Correctly check the peer group for mrt dumps. Without this all non-groupedClaudio Jeker
peers ended up in most mrt dumps. Also switch the if-statements to a hopefully easier to read version. Another mrt fix from my flight home. OK henning@
2009-03-18Correctly check for MRT_TABLE_DUMP_MP and don't send the config to the SE.Claudio Jeker
Make mrt table-mp dumps actually work. Found on the plane from NRT to ZRH. OK henning@
2009-03-18Introduce local_as in the peer config. This allows per peer local AS andClaudio Jeker
simplifies some code because it is possible to get the local AS from the peer struct. Local AS needs more patching to work correctly though. OK henning@
2009-03-18short_as is always initialised to the 16bit AS that is used. So no needClaudio Jeker
use conf->as as source for > 16bit AS numbers. OK henning.
2009-03-13No need for a line break, makes code a bit more compact.Claudio Jeker
2009-03-13Next step in mrt cleanup. Switch buf_write to a smarter version of itself.Claudio Jeker
Doing more the stuff msgbuf_write does and switch the only user -- mrt -- over to use this simpler way of writing out stuff.
2009-03-13Move mrt code over to use the msgbuf way of queuing buffers instead of rollingClaudio Jeker
an own version. More cleanup to come.
2009-03-13Sync buffer API with the one from ospfd. The dynamic buffers will make otherClaudio Jeker
code much easier to write. OK henning@ some time ago.
2009-03-13More paranoia when parsing empty updates. Make sure they are really empty andClaudio Jeker
don't come with some additional stuff attached to them. OK henning@
2009-03-13Correctly encode MP unreach NLRI so that IPv6 prefixes get removed correctly.Claudio Jeker
One bug was hiding another bug and only foundry based routers where unhappy about these bad updates. Found by Arnoud Vermeer and Elisa Jasinska at ams-ix. OK henning@
2009-02-25add a stupid workaround for a race somewhere in the crypto code in theHenning Brauer
kernel. a one second sleep has made it go away in all my tests. ok theo
2009-02-19Use a bob sized header for IPv6 not the default pedro sized one.Claudio Jeker
Seems like nobody ever tried to dump IPv6 tables. Found while reworking this code.
2009-02-17Fix aspath_prepend() in the case a AS-PATH has a sequence of 255 elementsClaudio Jeker
and we try to prepend. The result was a corrupt AS-PATH and a RDE fatal later on when some other operation was run on that path. Found the hard way by henning@ and sthen@. OK henning@, sthen@
2009-02-16typo in error message; "bigger that" -> "bigger than"Stuart Henderson
2009-02-11Because IPv6 fucked up and created a badly sized struct sockaddr_in6 we needClaudio Jeker
to add some pading on 64bit archs. Use a helper struct plus some ROUNDUP() magic to get the size correct. Tested on i386 and amd64 by Graeme Lee "graeme (at) omni (dot) net (dot) au" Some sort of OK by henning@ (he ignores the non-v4 code)
2009-02-09Correct function name in warning to avoid confusion. After a discussion onClaudio Jeker
misc@
2009-01-26Getting the higest IP only works if the compare is done in host byte order.Claudio Jeker
Same bug as in ospfd and ospf6d. *gulp*
2009-01-21timer_nextduein returned crap. fix it. so obvious... how could that happen.Henning Brauer
found out the hard way by Marc Runkel <MRunkel@untangle.com>
2009-01-13Reference RFC 4893 instead of draft-ietf-idr-as4bytes-13.Stuart Henderson
ok claudio
2009-01-13Replace NEW_ASPATH/NEW_AGGREGATOR with the naming from RFC4893,Stuart Henderson
AS4_PATH/AS4_AGGREGATOR. No binary change. ok claudio
2009-01-01Remove unneeded debug messages that made it into the tree.Claudio Jeker
2008-12-28Add a ugly workaround for the problem where an invalid AS4_PATH is passedClaudio Jeker
over mulitple hops and causes bgpd to close the connection. This is what the RFC requires us to do but the result is a DoS against all OpenBGPD routers when somebody injects such a bad optional transitive attribute because the intermediate routers don't give a damn about it. As a result we now ignore such bad prefixes and don't allow them in the decision process. The handling of optional transitive attributes needs to be rethinked because all of them can be abused in such a way. Idea OK by a few + henning@, tested myself against my crappy regress test suite that needs way more work.
2008-12-19document the default localpref, from discussion withHenning Brauer
Mick Hohmann <mick at IM dot net>
2008-12-12Make bgpd route priority aware and while there sync in the basics to correctlyClaudio Jeker
track multipath routes. Code is mostly stolen from similar fixes to ospfd but a bit different as this kroute.c implementation is more complex because of additional task (nexthop verification for example). This change and the similar ospfd change were desperatly needed on larger complex network setups which tended to end up in situation where the kernel had a different oppinion about routing than the daemon. Now the situation should be a lot better. Tested and OK sthen@ gollo@
2008-12-12Correctly set the partial bit on the AS4_PATH and AS4_AGGREGATOR attribute.Claudio Jeker
Per RFC4271 the partial bit must be set if the attribute was not generated on the originating router. This is mostly cosmetics. OK sthen@
2008-12-12Follow RFC 4271 more closely by sending the correct error back for optionalClaudio Jeker
attributes and use the correct lenght in some other error cases. OK sthen@
2008-11-21Track nexthops when the underlying route is changing. Until now true nexthopsClaudio Jeker
were only resolved when they were added. This calls for troubles if something like ospfd starts to change the underlying routes. Tested by gollo@, OK henning@
2008-11-06Mixed up characters found by Gleydson Soares.Claudio Jeker
2008-11-01Use correct function names in fatal() messages.Claudio Jeker
2008-10-17bring in the findeol() fix from pfctl. list of affected parsers by sthenHenning Brauer
2008-10-03Unify code between the various flavors of imsg buffer.c.Eric Faurot
Use unsigned int for msg_iovlen. ok henning@ claudio@
2008-10-02correct path for isakmpd/local.pub; from Matthew DempskyJason McIntyre
2008-09-29Correct the logic when matching prefixes. This solves issues where IPv6Claudio Jeker
prefixes where matched on a simple deny from any prefix 0.0.0.0/0 rule. OK henning@
2008-09-11remove hackery to un-demote after the session has been established forHenning Brauer
a while, we can now just use a timer (since i rewrote the timer code)
2008-09-10Properly free allocated memory if carp_demote_get encounters an error.Tobias Stoeckmann
ok henning@
2008-09-05ignore unknown SAFIs in the MP capabilities. used by some to distributeHenning Brauer
some kind of VPN stuff
2008-07-08Use correct format string specifier for int argument. Don't try to print itClaudio Jeker
as string. Fixes crash seen by Peter Bristow. "obviously ok" henning@
2008-06-26fatalx instead of fatal because errno is not set of pipe is closed. OK henningClaudio Jeker
2008-06-15Allow bgpd to delete more then one community per filter rule. Fixes PR5807Claudio Jeker
tested by Raphael Ho long time ago.
2008-06-15Paranoia check. Make sure that the 2 len bytes are actually available.Claudio Jeker
Another easy M hiding in my bgp source forest.
2008-06-11use monotime instead of wallclock.Henning Brauer
makes us independent from system time changes. diff from japan,was hiding... ok claudio some time ago
2008-05-12Error out with usage line if additional arguments are given after thePierre-Yves Ritschard
option parsing. Found out the hard way by jdixon on ifstated. ok sobrado@, jdixon@, millert@
2008-05-11allow IMSG_CONTROL_SHOW_TIMER on restricted socketsHenning Brauer
2008-05-09insert/delete routes with priority RTP_BGPHenning Brauer
this is mostly cosmetical for the moment, there are bigger changes required to make full use of the route priorities, but this is the first step to do. discussed with claudio
2008-05-08backout shit committed on accidentHenning Brauer