Age | Commit message (Collapse) | Author |
|
|
|
|
|
Currently the receiver fetches an imsg via imsg_get() and if he expects
an fd, he then calls imsg_get_fd() to fetch the next fd queued on the
imsgbuf from which the imsg came.
This changes hides the fd queueing mechanism to the API user. When closing
an imsg with an fd, the message is flagged so that the receiving end knows
it must dequeue the fd in imsg_get() and return it with the imsg structure.
This way there is no (less) possible screw up from imsg_get_fd() not being
called directly after imsg_get() by the user. The retreived imsg is
self-contained.
ok pyr@, "I like that" henning@
|
|
not fully understand but at least no flames are comming out of my test
box anymore.
|
|
|
|
ok claudio@ pyr@
|
|
|
|
It is ugly but does the trick for now. Filters will be rewritten anyway.
The rib specifier only makes sense on from rules. e.g. deny rib OMG from any
|
|
comming from.
|
|
|
|
bgpctl are missing to have full support of multiple RIBs.
|
|
possible to as many as you like). The mrt dumps are now done with the same
tree walking code as the control messages. Makes the RDE respond a bit faster
and use less memory while dumping.
|
|
There is still a problem with the mrt dumps because we only allow one in the
RDE. This needs some additional work.
|
|
|
|
Still a bit hackish, reload is missing and printconf as well. Looks good h@
|
|
show rib commands. This makes the output sorted by prefix and not some rather
randomly output.
|
|
|
|
rib_context instead of the ctl specific rde_dump_ctx to make it more general.
|
|
changes to make multiple RIB functional. Also change the way we account the
prefixes per peer (for maxprefix check). Every prefix that was added to any
RIB is counted. OK henning@
|
|
Fix pf table code by checking if the aspath has a pftableid set or not
instead of doing the F_LOCAL dance. This works because the in the
Adj-Rib-In it is impossible to set pftableid.
|
|
the imsgs back to the right pid and not some more or less random address.
|
|
work by changing the way the RDE DB is built. struct prefix and struct
pt_entry are simplified and extended with a rib_entry where the decision
tree is run on. From now on a prefix can only reside on one particular RIB
which simplifies the code a bit. Currently there are two fixed ribs
(adj-rib-in and the local-rib) which needs to be made more dynamic in
upcomming commits.
This is work in progress, the RDE seems to work for me and sthen@ (no flames
comming out of our testrouters but there is still a lot missing)
Move into the tree to simplify developement -- henning@
|
|
man page. Problem found by Rod Whitworth. OK sthen@
|
|
use one that is less freaky. Merge bgpctl and config networks into one tree.
First step of a larger change in the RDE and this goes now in to allow to
move forward.
|
|
Make mrt table-mp dumps actually work. Found on the plane from NRT to ZRH.
OK henning@
|
|
|
|
Doing more the stuff msgbuf_write does and switch the only user -- mrt --
over to use this simpler way of writing out stuff.
|
|
an own version. More cleanup to come.
|
|
don't come with some additional stuff attached to them.
OK henning@
|
|
AS4_PATH/AS4_AGGREGATOR. No binary change.
ok claudio
|
|
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.
|
|
attributes and use the correct lenght in some other error cases.
OK sthen@
|
|
Another easy M hiding in my bgp source forest.
|
|
is localy originated and so is eligible by definition.
Noticed and fix tested by Christian, bsd (at) cleondra (dot) ch
|
|
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@
|
|
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)
|
|
string that it returned later. rde_update_log() did not do that.
Memory leak found and diff provided by Mike Belopuhov.
|
|
reloading.
``yeah that is good'' henning@
|
|
|
|
are now 4-byte instead of the old 2-byte numbers. The only exception are
communities because they can not be switched. The RDE will inflate and deflate
the ASPATH and AGGREGATOR attributes on demand and create the NEW_ASPATH and
NEW_AGGREGATOR field whenever needed. Both old and new stile sessions are
supported and can be mixed. Currently new stile sessions with the 4-byte AS
number capability turned on are only enabled if one of the AS numbers involved
is a 4-byte one.
This is based on an initial diff by Geoff Huston gih (at) apnic (dot) net
Cleanup, testing and bug-fixes by myself (via AS 3.10).
Currently mrt table dumps are producing incompatible output this will be fixed
afterwards -- this diff is already big enough.
"get it in if you think it is ready" henning@
|
|
Discussed with henning@
|
|
mostly from rivo nurges <rix@estpak.ee>, ok claudio
|
|
|
|
a few things we actually never realy cared about.
OK henning@
|
|
have pending imsgs to send or that we reduce the poll timout to 0. This
fixes hanging and extrem slow performing bgpctl show rib commands.
Found by Jon Morby additional testing by Stuart Henderson. OK henning@
|
|
|
|
- dedicated pipe between the SE and the RDE for control messages
- restartable RB tree dumps in the RDE
- queuing limits both in the SE and RDE
The result is a dramatic decrease of memory consumption on operations like
bgpctl show rib. Previously all messages where first stored in the RDE
then passed to the SE where they got queued in case bgpctl was not fast enough.
Now only a small number of messages is generated and passed to the SE and
the SE has an additional limit instead of acting like an infinite buffer.
Without this the bgpd on bgpd.networx.ch would not survive a single minute.
looks good henning@
|
|
This is needed because the nexthop is not yet linked to the aspath attributes
and so a withdraw in the same update imsg could remove this nexthop which in
turn causes a use after free error when the prefix is added later on.
The order of parsing (attributes, withdraws, prefixes instead of withdraws,
attributes, prefixes) was reversed for multiprotocol support.
This should fix all strange nexthop crashes seen by various people.
Tested and OK henning@
|
|
On some of my systems rde_shutdown() takes more than 3min doing nothing more
than calling free(3) over and over again.
|
|
OK henning@
|