summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
AgeCommit message (Collapse)Author
2004-01-10use writev(2) to get as many messages out at once as possible.Henning Brauer
should gives us a little exra performance gain ok claudio@
2004-01-10re-enable sending outgoing updatesHenning Brauer
ok claudio@
2004-01-10Implement as path prepends. At least one prepend is needed for ebgpClaudio Jeker
neighbors. Fix a bug in the update generation. If no path attributes are available e.g. a packet with only withdraws we need to set (and write) the bgp path attribute field to zero. With this change we are able to send valid updates to our neighbors with one exception: the nexthop field which needs to be changed for ebgp neighbors. OK henning@
2004-01-10we may only write after a POLLOUT, and then, we only may write once.Henning Brauer
if we don't play by these rules the next write may block. make us adhere. ok claudio@
2004-01-10we are only interested in POLLOUT for a session socket when we eitherHenning Brauer
have queued writes or the connection is not yet established - but certainly not if we ever had a queued write, forever... ok claudio@
2004-01-10disable sending UPDATEs for now; it triggers som blocking bug...Henning Brauer
ok & debugging band-aid claudio@
2004-01-10i buy a break;Henning Brauer
2004-01-10send out UPDATE messages to the peer(s) that we receive from the RDEHenning Brauer
ok claudio@
2004-01-10RDE update generation. First we queue all updates and withdraws on a perClaudio Jeker
peer basis. A queue runner will dequeue and package those messages to valid bgp UPDATE messages and send them to the SE. Not yet done is per peer type attribute handling (like aspath prepends and nexthop modifications) and the queue runner could be a tad smarter. All in all this gives us a good starting point for the missing parts. OK henning@
2004-01-09for IMSG_CTL_KROUTEs allow matching based on flags,Henning Brauer
add IMGS_CTL_KROUTE_ADDR to match the route for a given address ok claudio@
2004-01-09flag kernel routes whch are not conencted routes as static routes.Henning Brauer
that's what they are, and it makes matching on them easier.
2004-01-09get us a stateful imsg relaying framework, and the first receiver,Henning Brauer
IMSG_CTL_KROUTE, to have the kroute structs forming the fib sent to a control socket. ok claudio@
2004-01-09we must ignore SIGPIPE.Henning Brauer
we do notice closed pipes just fine, tho there was at least one case where we tried a write without POLLOUT and that got us a SIGPIPE before our pipe closed detection catched it. ok claudio@
2004-01-09you must not try to read(2) without checking (pfd->revents & POLLIN)Henning Brauer
you must not try to read(2) without checking (pfd->revents & POLLIN) you must not try to read(2) without checking (pfd->revents & POLLIN) [...] you must not try to read(2) without checking (pfd->revents & POLLIN)
2004-01-09for RTM_IFINFO messages showing up on the routing socket do not everHenning Brauer
look into the first sockaddr structure after the msg header; does not contain what we expect there and caused messages to get missed in some cases
2004-01-08in kroute_insert, use knexthop_validate instead of hand-baking a slightlyHenning Brauer
optimized version of it
2004-01-08in knexthop_validate, always call kroute_detach_nexthop, notHenning Brauer
only in the no-match-found case. if we fina a match we are calling kroute_attach_nexthop anyway; and the match might be (in the common cases: will be, if existant at all) different for the existing attachment.
2004-01-08fix kroute_detach_nexthopHenning Brauer
2004-01-08our own internal route flags should have been an u_int8_t from the beginningHenning Brauer
on, not an int.
2004-01-08rename a few functions to further clarify thingsHenning Brauer
2004-01-08big reorganization.Henning Brauer
much nicer now. ok claudio@
2004-01-08KNFHenning Brauer
2004-01-08keep track of interface status. if an interface goes down mark all connectedHenning Brauer
routes that belong to it as invalid, and invalidate all nexthops belonging to it, and vice versa when it goes up "looks good" claudio@ on the version from yesterday night '-)
2004-01-07deal with messages on the AF_ROUTE socket in a multiprotocol friendlier way.Henning Brauer
this is also some preparation for v6 support. "looks good" claudio@
2004-01-07fix a check that catched too much... now connected routes that appearHenning Brauer
after startup (due to addition of an ip to an interface) are handled correctly.
2004-01-07Modified version of hennings last patch. OK henning@Claudio Jeker
2004-01-07Duh. Fixing stupid braino. OK henning@Claudio Jeker
2004-01-07Document mrt dump comands. Help by jmc@ OK henning@Claudio Jeker
2004-01-07don't ever send kroute change (that includes add) requests to the parentHenning Brauer
where the nexthop is not in state NEXTHOP_REACH. previously routes in state NEXTHOP_LOOKUP, i. e. not yet verified, were send to the parent process causing unnecessary and of course failing route add attempts, cluttering logs, etc. nexthops in state NEXTHOP_UNREACH were handled correctly.
2004-01-07handle global vs peer-specific holdtime in a nicer and reload-friendlierHenning Brauer
way
2004-01-07don't try to be smart after config reloads and try to detect wetherHenning Brauer
a session needs a reinit for the new conf to kick in. the logic is condemned to fail, and implicitly taking sessions down is BAD. after discussion with mickey@, ok claudio@
2004-01-07Make sure that kroute updates for the FIB are only sent if there is aClaudio Jeker
change. Until now rde_send_kroute tried to send a IMSG_KROUTE_DELETE if old and new prefix where ineligible. OK henning@
2004-01-06small bug that was not so easy to fix: we did not allow empty lines (orHenning Brauer
comment-only lines) in the middle of neighbor/group blocks. as first or last line in thise blocks they were accepted, but not in between. ok deraadt@
2004-01-06two new imsg types, IMSG_CTL_NEIGHBOR_UP and _DOWN, on their receival on theHenning Brauer
control socket the given neighbor session is sent a START / STOP signal. ok claudio@
2004-01-06initialize new peers inline instead of looping through 'em initing eachHenning Brauer
before the mainloop started, and a speerate init for those coming in on reloads. much easier this way. ok claudio@
2004-01-06Free buf on error and correct of by one in strlcpy.Claudio Jeker
From Patrick Latifi <pat at eyeo.org> OK henning@
2004-01-06in session_dispatch_msg, in the loop where we suck the messages out of theHenning Brauer
buffers, we need to check wether the buffers are still there before trying to get the next message. the previous one might have caused the session to drop back to the IDLE state, which implies that those buffers have been deallocated. ok claudio@
2004-01-06allow holdtime and holdtime min to be configuered per peerHenning Brauer
ok claudio@
2004-01-06lower the initial value for the IdleHold timer from 90 to 30 seconds.Henning Brauer
90 is too much, and now that the punishment works as intended oscillating peers get slowed down by that
2004-01-06properly punish oscillating neighbors.Henning Brauer
previously we were to forgiving so the punishment didn't kick in as intended
2004-01-06rename our StartTimer to IdleHoldTimer as per draft-ietf-idr-bgp4-23Henning Brauer
2004-01-062004 OK henning@Claudio Jeker
2004-01-06Fix reopening of dump files.Claudio Jeker
OK henning@
2004-01-062004Henning Brauer
2004-01-05Big overhaul of the mrt code.Claudio Jeker
Dumping of incomming bgp messages is now possible and dumping the (not yet) filtered updates works too. Per neighbor dumps are still missing. OK henning@
2004-01-05fix commentsClaudio Jeker
OK henning@
2004-01-05missing fclose()Henning Brauer
fd leak pointed out by Patrick Latifi, but it was not so easy to fix before I just killed the support for config from stdin and his fix didn't work. however, this is the 16 bytes memory leak on config reload i was hunting for some time, big thanks to Patrick!
2004-01-05correctly handle SIGCHLD.Henning Brauer
SIGCHLD does _not_ translate to "a child process went kaboom". waitpid() and check status; if the child exited or terminated log & quit ok claudio@
2004-01-05remove support for reading configuration from stdin.Henning Brauer
that really does not make sense with a daemon and probably breaks horribly on config reload
2004-01-05fix off by ones with strlcpy()Henning Brauer
memleak fixes in error paths From: Patrick Latifi <pat@eyeo.org>