summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
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
2008-05-08timer_due is not needed any moreHenning Brauer
2008-05-08KNFHenning Brauer
2008-05-08take advanatge of the timewheelin timer_nextduein - we just need to lookHenning Brauer
at the first one
2008-05-08we can stopin timer_set if new timeout equals the oldone.Henning Brauer
matters for stuff like the HoldTimer that gets reset often
2008-05-08take advantage of the timewheel: instead of checking each an everyHenning Brauer
timer, just get the first off the queue and check wether it is due
2008-05-08in timer_set, when figuring out the right position for the timer,Henning Brauer
wemust stop walking the list once werun into a stopped timer, or eventually all stopped timers will queue up at the very front (instead of at the tail)
2008-05-08change timer internals so that we use a timewheel (tailq, sorted by expiryHenning Brauer
so that the timer that will expire first is always the first element, and so on). will make the checking a bit faster and moreelegant and more conveniant. ok claudio
2008-05-08make sure we always send back something on IMSG_CTL_SHOW_NEIGHBORHenning Brauer
namely, the "no such neighbor" case was missing. problem spotted by martin,ok claudio
2008-05-02Compare flags against the right flag field or else unexpected things mayClaudio Jeker
happen. The decision process failed to correctly mask looping pathes and in some szenarios even elected them as best route. *gulp* Found the hard way and fix tested by Christian, bsd (at) cleondra (dot) ch
2008-05-02Fix logic when setting the F_RIB_ELIGIBLE flag. A path with a NULL nexthopClaudio Jeker
is localy originated and so is eligible by definition. Noticed and fix tested by Christian, bsd (at) cleondra (dot) ch
2008-03-24msg_controllen has to be CMSG_SPACE so that the kernel can account forTheo de Raadt
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This works now that kernel fd passing has been fixed to accept a bit of sloppiness because of this ABI repair. lots of discussion with kettenis
2008-03-22Mention that softreconfig is on by default. From Matthew DempskyClaudio Jeker
2008-03-17two small bugs in printing funcs:Henning Brauer
log_as < vs <= confusion, AS 65535 printed like 4 byte AS 0.65535 aspath_strlen: omitted stripping high 16 bits of 32bit AS after dealing with the upper half From: Matthew Dempsky <matthew@dempsky.org>
2008-03-15Repair more msg_controllen dealing with structures or arrays ofTheo de Raadt
descriptors; ok hshoexer, also looked at by kettenis and henning
2008-03-15Repair the simple cases for msg_controllen where it should just beTheo de Raadt
CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because of alignment; ok kettenis hshoexer
2008-03-13Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due toTheo de Raadt
an extensive discussion with otto, kettenis, millert, and hshoexer
2008-02-26Ignore and drop path attributes with a type code of 0 instead of sending anClaudio Jeker
error back. This increases robustness without causing any issues. The RFC does not forbid the use of 0 in the type code but it is not explicitly allowed and the type code list at IANA does not mention 0 at all. OK henning@
2008-02-26Have popfile() also close the main config file,Marco Pfatschbacher
but only do the final popfile call after yyparse() is done. This also fixes config reload on SIGHUP for some daemons. Spotted by otto@. OK deraadt@
2008-01-31do not leak confd on malloc failure in control_accept()Henning Brauer
found by Igor Zinovik <zinovik@cs.karelia.ru>