summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
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>
2008-01-23Add defines for extended communities. OK henning@Claudio Jeker
2007-12-23provide timer_nextduein, which provides the number of seconds until theHenning Brauer
next timer expires. use that in the session engine's mainloop, which simplifies it and removes the last bits of timer internals knowledge from anywhere outside timer.c.
2007-12-23send timers for bgpctlshow neighbor foo timer in seperate messages afterHenning Brauer
the peer data. makes bgpctl display code independent from timer implementation internals. only running timers are displayed now, stopped ones are skipped.
2007-12-23use timer_running (with left = NULL, which the last commit made possible)Henning Brauer
instead of timer_get and checking manually
2007-12-23make all timer_get() callers (except timer_set which will needHenning Brauer
special handling) and onein session.c that will go away able to cope with timer_get() returning NULL (i.e.nosuch timer/not running)
2007-12-20rework timers.Henning Brauer
stop changing tienmr values directly, always use new timer_(get/set/stop/running) functions. preparation for more to come :) ok claudio
2007-11-27Prefixes or actually pathes that would cause a rooting loops should not beClaudio Jeker
dropped when parsed but instead be added to the RIB marked as not eligible. So the decision process does not pick them up as a valid route. Tested and some ideas by Tony Sarendal (tony (at) polarcap (dot) org)
2007-11-24Another missing RTM_VERSION check. This will remove the RB_INSERT warningsClaudio Jeker
seen on startup.
2007-11-24some spelling fixes from Martynas VenckusJason McIntyre
2007-11-22add "demote", was missing. noticed by camield@Henning Brauer
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-10-21Being able to set the decision weight of prefixes is a nice feature, butMichael Knudsen
when it's not really documented in what way it influences the decision process, people like myself will screw it up and assume that it gets added to the prefix path lenth, and thus that smaller weight wins. .. which is not the case. Document the actual behaviour. ok claudio, the general change agreed by henning. proofraed by jmc.
2007-10-20ntpd and bgpd's turn to behave like the others.Pierre-Yves Ritschard
ok henning@
2007-10-16Allow '=' to end a number in all lexers.Marco Pfatschbacher
Requested and OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-10-04when inserting blackhole or reject routes, set the gateway address toHenning Brauer
127.0.0.1 / ::1 unconditioally, since RTF_BLACKHOLE/REJECT are not actually checked in the forwarding path and the gw doesn't matter otherwise. makes them work.. found teh hard way by me. claudio ok
2007-09-16log_fmt_peer() does not use a static buffer so it is necessary to free theClaudio Jeker
string that it returned later. rde_update_log() did not do that. Memory leak found and diff provided by Mike Belopuhov.
2007-09-13Move parser to use NUMBER as all other parse.y do know. A bit tricky becauseClaudio Jeker
all the relative metrics need some special handling. OK henning@ deraadt@
2007-09-11baudrate u_long -> u_int64_tHenning Brauer
2007-06-19Ignore SIGHUP in bgpd's children to allow the use of pkill -1 bgpd forPierre-Yves Ritschard
reloading. ``yeah that is good'' henning@
2007-06-01Remove a stupid wrapper function that does nothing more then calling anotherClaudio Jeker
function with the same arguments.
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-31Init community in get_rule() to COMMUNITY_UNSET. get_rule() is called whenClaudio Jeker
set is used inside neighbor or group statements and the result was that these rules no longer machted everything. Problem found by Jon Morby. Please commit henning@
2007-05-31Correctly encode ATTR_NEW_AGGREGATOR. The new aggregator is the one thatClaudio Jeker
bgpd uses internaly so we can just dump that one out. Found by Stuart Henderson, OK henning@
2007-05-31Even so some IX in germany likes to abuse 0 as AS community number we shouldClaudio Jeker
not allow anybody to use 65535. That one is reserved for well known communities. Add in that check again.