summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2003-12-26let imsg_get and imsg_compose not fatal() but return errors upstream.Henning Brauer
make the callers cope.
2003-12-26when this project started and i added the fatal() function, I made it takeHenning Brauer
the error number as parameter instead of accessing errno, because in one place the error number was not in errno but fetched from a socket. now, of course it makes much more sense to just set errno to the error number just fecthed in this one place instead of having hundreds of fatal() calls all transfer the errno round and round and round... fix this, and also provide a fatalx, which does not care for errno and doesn't invoke strerror. oh, btw, in the place where we fetch the err # from the socket, we don't call fatal anymore anyway...
2003-12-26by making kroute_dispatch_msg() and kroute_nexthop_add() return int insteadHenning Brauer
of void they can now report errors upstream and do not need to panic any more. so do that and handle the errors in bgpd.c in the vein that we at least can clean up before exit. there are no direct fatal() call in kroute.c now any more, nor any in bgpd.c after forking.
2003-12-26report as many errors upstream as possible instead of fatal() so theyHenning Brauer
can be handled better
2003-12-26overhaul error handlingHenning Brauer
try to handle as much as possbile in a graceful way so taht we don't leave the kernel routing table full of our routes, for example.
2003-12-26need to clean errno before returning error in the custom caseHenning Brauer
2003-12-26handle kroute_init failures nicerHenning Brauer
2003-12-26provide a real log_errHenning Brauer
2003-12-26Allow storing of `arch' annotations inside packages.Marc Espie
Factor common method code in write, keep variations in stringize.
2003-12-26log_err -> log_peer_errHenning Brauer
log_errx -> log_peer_errx because that is what they really are, peer specific.
2003-12-26pkg_add reports size taken on each fs.Marc Espie
Reorg and clean Vstat a bit. okay naddy@
2003-12-26127/8 is special, and thus needs special protection.Henning Brauer
on startup, insert a fake route for it to our private view of the kernel routing table, and flag it as kernel and connected route. we never allow a bgp route to overwrite a kernel route. prodded by theo
2003-12-26o improve logging dramaticallyHenning Brauer
o handle more errors gracefullt instead of panic o don't leak mem on RB_INSERT failues (not a common case anyway, but...) o zap a few unneeded variables
2003-12-26improve log messageHenning Brauer
2003-12-26log nexthop status changesHenning Brauer
2003-12-26+ log_ntoa, a simple helper funtion that doesn't require a struct in_addr...Henning Brauer
2003-12-26remove he pathetic log_kroute()Henning Brauer
not used anywhere anyway
2003-12-26handle IMSG_NEXTHOP_DELETE as wellHenning Brauer
2003-12-26In the mrt state machine one state was forgotten. This caused the parentClaudio Jeker
process to quit it a fatal buf_close error message. Noticed and reported by jakob@ OK henning@
2003-12-26kroute_nexthop_check -> kroute_nexthop_addHenning Brauer
kroute_validate_nexthop -> kroute_nexthop_insert
2003-12-26kroute_validate_nexthop is a private functionHenning Brauer
2003-12-26finally marry rde and kroute parts of the nexthop verification:Henning Brauer
handle IMSG_NEXTHOP_ADD and send IMSG_NEXTHOP_UPDATE when appropriate
2003-12-26o in struct nexthop_node, we don't need the full kroute_nexthop struct,Henning Brauer
| the nexthop address itself is enough o RB_INIT the nexthop table o don't forget to set the key field before RB_INSERT...
2003-12-25Turn the nexthop verification on. At least in the RDE.Claudio Jeker
ok henning@
2003-12-25styleHenning Brauer
2003-12-25RDE part of the nexthop verification puzzle.Claudio Jeker
The RDE just tracks the nexthop IPs and reacts on nexthop messages from the parent. ok henning@
2003-12-25nothing uses the special return value kroute_msg used to set for EEXIST anyHenning Brauer
more, so zap the special treatment for EEXIST
2003-12-25bring us closer to a complete nexthop verification that does NOT needHenning Brauer
periodic scans: -keep a tree of nexthops with valid/invalid flags -provide kroute_match, which takes an IP address and gives the kernel route for that -find the kernel route for a given nexthop with that -keep a marker on the kernel route that a nexthop depends on it -on removal of the kernel route, re-evaluate the affected nexthops for validity. ok claudio@
2003-12-25detect connected routes and flag them as suchHenning Brauer
2003-12-25bootparams is right nameTheo de Raadt
2003-12-25must not remove macros vis cmdline after parsinf is done, we will need themHenning Brauer
again on reload
2003-12-25don't leak in yyerror()Henning Brauer
2003-12-25o can't TAILQ_FOREACH when we TAILQ_REMOVE in the loopHenning Brauer
o free(sym)
2003-12-25free where it was allocated; much easier to verifyHenning Brauer
2003-12-25don't leak memory THAT obvious on reconfigureHenning Brauer
2003-12-25track routing table changes that are _not_ caused by bgpd itselfHenning Brauer
ok claudio@
2003-12-25factor out prefixlen_classful() and mask2prefixlen()Henning Brauer
2003-12-25implement "passive": do not attempt to open a tcp connection to theHenning Brauer
neighbor system
2003-12-25make the listening socket nonblocking as well.Henning Brauer
there's a small probability that poll() announces us a new connection on the listening socket that vanishes before we can call accept(), and thus accept() would block.
2003-12-25small gotcha in the FSM:Henning Brauer
if we're in state ACTIVE and get an TIMER_CONNRETRY event, we need to change the state to CONNECT _before_ we call session_connect() to attempt a connect, as session_connect can generate events that caus further state changes. as far as i saw that it only causes a bit confusion for sessions dangling between CONNECT and ACTIVE all the time without causing real trouble, but bugs are bugs, right.
2003-12-25we need nonblocking connectHenning Brauer
2003-12-25Fix multi-line stringAlexander Yurchenko
ok otto@
2003-12-25kill an inappropriate XXXHenning Brauer
2003-12-25remove a useless check & commentHenning Brauer
2003-12-25(more or less) handle ESRCH for RTM_ADDHenning Brauer
2003-12-25kill IMSG_KROUTE_ADD as well. just send KROUTE_CHANGE requests.Henning Brauer
2003-12-25it actually makes more sense to call the merged function kroute_changeHenning Brauer
2003-12-25kroute_change is obsolete, long live kroute_addHenning Brauer
2003-12-25check with our local view wether there is already an entry for the to beHenning Brauer
added prefix in the kernel routing table. if yes and inserted by us change action from ADD to CHANGE, if not added by us do not add or change that prefix.
2003-12-25oups, remove debugging cruftHenning Brauer