Age | Commit message (Collapse) | Author | |
---|---|---|---|
2003-12-26 | let imsg_get and imsg_compose not fatal() but return errors upstream. | Henning Brauer | |
make the callers cope. | |||
2003-12-26 | when this project started and i added the fatal() function, I made it take | Henning 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-26 | by making kroute_dispatch_msg() and kroute_nexthop_add() return int instead | Henning 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-26 | report as many errors upstream as possible instead of fatal() so they | Henning Brauer | |
can be handled better | |||
2003-12-26 | overhaul error handling | Henning 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-26 | need to clean errno before returning error in the custom case | Henning Brauer | |
2003-12-26 | handle kroute_init failures nicer | Henning Brauer | |
2003-12-26 | provide a real log_err | Henning Brauer | |
2003-12-26 | Allow storing of `arch' annotations inside packages. | Marc Espie | |
Factor common method code in write, keep variations in stringize. | |||
2003-12-26 | log_err -> log_peer_err | Henning Brauer | |
log_errx -> log_peer_errx because that is what they really are, peer specific. | |||
2003-12-26 | pkg_add reports size taken on each fs. | Marc Espie | |
Reorg and clean Vstat a bit. okay naddy@ | |||
2003-12-26 | 127/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-26 | o improve logging dramatically | Henning 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-26 | improve log message | Henning Brauer | |
2003-12-26 | log nexthop status changes | Henning Brauer | |
2003-12-26 | + log_ntoa, a simple helper funtion that doesn't require a struct in_addr... | Henning Brauer | |
2003-12-26 | remove he pathetic log_kroute() | Henning Brauer | |
not used anywhere anyway | |||
2003-12-26 | handle IMSG_NEXTHOP_DELETE as well | Henning Brauer | |
2003-12-26 | In the mrt state machine one state was forgotten. This caused the parent | Claudio Jeker | |
process to quit it a fatal buf_close error message. Noticed and reported by jakob@ OK henning@ | |||
2003-12-26 | kroute_nexthop_check -> kroute_nexthop_add | Henning Brauer | |
kroute_validate_nexthop -> kroute_nexthop_insert | |||
2003-12-26 | kroute_validate_nexthop is a private function | Henning Brauer | |
2003-12-26 | finally marry rde and kroute parts of the nexthop verification: | Henning Brauer | |
handle IMSG_NEXTHOP_ADD and send IMSG_NEXTHOP_UPDATE when appropriate | |||
2003-12-26 | o 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-25 | Turn the nexthop verification on. At least in the RDE. | Claudio Jeker | |
ok henning@ | |||
2003-12-25 | style | Henning Brauer | |
2003-12-25 | RDE 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-25 | nothing uses the special return value kroute_msg used to set for EEXIST any | Henning Brauer | |
more, so zap the special treatment for EEXIST | |||
2003-12-25 | bring us closer to a complete nexthop verification that does NOT need | Henning 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-25 | detect connected routes and flag them as such | Henning Brauer | |
2003-12-25 | bootparams is right name | Theo de Raadt | |
2003-12-25 | must not remove macros vis cmdline after parsinf is done, we will need them | Henning Brauer | |
again on reload | |||
2003-12-25 | don't leak in yyerror() | Henning Brauer | |
2003-12-25 | o can't TAILQ_FOREACH when we TAILQ_REMOVE in the loop | Henning Brauer | |
o free(sym) | |||
2003-12-25 | free where it was allocated; much easier to verify | Henning Brauer | |
2003-12-25 | don't leak memory THAT obvious on reconfigure | Henning Brauer | |
2003-12-25 | track routing table changes that are _not_ caused by bgpd itself | Henning Brauer | |
ok claudio@ | |||
2003-12-25 | factor out prefixlen_classful() and mask2prefixlen() | Henning Brauer | |
2003-12-25 | implement "passive": do not attempt to open a tcp connection to the | Henning Brauer | |
neighbor system | |||
2003-12-25 | make 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-25 | small 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-25 | we need nonblocking connect | Henning Brauer | |
2003-12-25 | Fix multi-line string | Alexander Yurchenko | |
ok otto@ | |||
2003-12-25 | kill an inappropriate XXX | Henning Brauer | |
2003-12-25 | remove a useless check & comment | Henning Brauer | |
2003-12-25 | (more or less) handle ESRCH for RTM_ADD | Henning Brauer | |
2003-12-25 | kill IMSG_KROUTE_ADD as well. just send KROUTE_CHANGE requests. | Henning Brauer | |
2003-12-25 | it actually makes more sense to call the merged function kroute_change | Henning Brauer | |
2003-12-25 | kroute_change is obsolete, long live kroute_add | Henning Brauer | |
2003-12-25 | check with our local view wether there is already an entry for the to be | Henning 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-25 | oups, remove debugging cruft | Henning Brauer | |