summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
AgeCommit message (Collapse)Author
2005-12-09Unkown attributes need to be optional, if not issue a "unknown wellknownClaudio Jeker
attribute" error. While this check is already present in the error handling function it is not done while parsing. Found via regress, OK henning@
2005-12-08Missing ntohs() in error path. Found via regress test.Claudio Jeker
2005-11-30No need to filter incoming withdraws just try to remove everything form theClaudio Jeker
RIB -- if it got filtered before so be it.
2005-11-29Add a flags field to struct prefix which will be used shortly. Remove the peerClaudio Jeker
pointer so that the size does not grow. Adding 4 bytes to struct prefix would result in 64MB more memory usage on one of my systems.
2005-11-29even more spaces and tabs.Claudio Jeker
2005-11-02Use the new rde_filter_equal() with dir = DIR_OUT to check if a soft-Claudio Jeker
reconfigure out run is needed or not. If the output filters did not change no table walk is needed.
2005-11-01Softreconfig out support. On config reload filter changes of outgoing rulesClaudio Jeker
will propagte directly to the neighbors. There is no need to restart bgpd in that case. Currently not optimal but a good start. "get it in" henning@
2005-11-01Major cleanup in rde_update.c. Merge equal code used in different placesClaudio Jeker
into own functions. Move up_dump_upcall() into rde.c and rename it rde_up_dump_upcall(). This is needed for the next step. up_test_update() tests if an update or withdraw is needed and up_generate() creates the updates. "get it in" henning@ (he is eager on softreconfig out)
2005-11-01Switch from the per peer filter set list to a filter-only solution.Claudio Jeker
The default filter_sets are converted into match filter rules that get evaluated first. Simplifies code massively -- mainly the config reload part -- and makes softreconfig out a piece of cake. "get it in" henning@
2005-10-13Simplify poll loop, there is no need for nfds tracking. While there killClaudio Jeker
some comments that are totaly wrong. OK henning@
2005-09-21Make sure that "updates" with only MP withdraws (MP_UNREACH_NRLI) stopClaudio Jeker
processing after the MP withdraw block. OK henning@
2005-09-20allow "show rib" to be limited to an address family tooHenning Brauer
2005-09-20let "bgpctl network show" print v6 addresses correctlyHenning Brauer
2005-09-19KNFHenning Brauer
2005-08-10Pass the correct peer to rde_apply_set(). rde_apply_set() needs to knowClaudio Jeker
the peer where the prefix came from so that prepend-neighbor works. Extend rde_filter() and make sure that the correct peer is passed. Until now most cases resulted in a NULL peer causing a nasty crash that was found by David Ulevitch. OK henning@
2005-07-29Debugging session at WTH. Fix many bugs in the IPv6 support -- some copy pasteClaudio Jeker
and some more obscure ones. With this is it possible to run IPv6 sessions between two bgpd. OK if it does not break IPv4 hummpa barman Henning
2005-07-29Add another piece to the IPv6 puzzle. This time code to generate MP updates.Claudio Jeker
Does not affect IPv4 minimaly tested for IPv6 because we still don't have an IPv6 capable neighbor. henning@ ya
2005-07-01Switch filter_sets form SIMPLEQ to TAILQ, needed for upcomming stuff.Claudio Jeker
2005-07-01The newly introduced function filterset_free() existed already asClaudio Jeker
rde_free_set(), I just missed it when I was looking for it. Kill rde_free_set() and use the more correct filterset_free() from now on.
2005-07-01Make the pftable filter set use the name2id "cache" like the route labels.Claudio Jeker
This saves 14 bytes per aspath. OK henning@
2005-06-29rtlabel support via filter sets. Just use "set rtlabel foobar" in filtersClaudio Jeker
network and neighbor statements and the routes are labeled accordingly. While doing that fix some mem-leaks by introducing filterset_free() and remove the free on send option of send_filterset(). This took a bit longer because we need to carefully track the rtlabel id refcnts or bad things may happen on reloads. henning@ looks fine
2005-06-13route label support, kroute part and ID allocator as well as the internalHenning Brauer
interface changes. support in the filter language and rde to come. claudio ok
2005-06-10Simplify show rib upcalls. Kill one mostly unused function.Claudio Jeker
2005-05-23no need for endpwent()Henning Brauer
(you lost, theo)
2005-05-03setres[ug]id; ok claudio@Damien Miller
2005-04-28Support for "network connected" and "network static" -- announce allClaudio Jeker
directly connected respectively all static routes. The list is auto- matically adjusted as soon as a route changes. OK henning@
2005-04-16Format string cleanup. OK millert, henning, claudioChad Loder
2005-03-28ewps, this was not supposed to creep inHenning Brauer
2005-03-28free rules_l if the initial config file parse failsHenning Brauer
2005-03-24soem fatal()s that should be fatalx()s, Alexander von GernlerHenning Brauer
2004-11-23Switch from a single filter_set to a linked list of sets. With this changeClaudio Jeker
it is possible to specify multiple communities. This is also the first step to better bgpd filters. OK henning@
2004-11-19For consistency reasons rename struct as_filter to struct filter_as.Claudio Jeker
OK henning@
2004-11-11Unbreak peer_localaddr() because Link Local Addresses reported byClaudio Jeker
getifaddrs() have the scope id added to the address and so fuck up in the compare later. This part has bin stolen from ifconfig/ifconfig.c and shows the beauty of IPv6. Thank you KAME. disgusting but OK henning@
2004-11-11Pass the copied as-path attributes to the filter function and not theClaudio Jeker
original. Affected code is currently still unreachable.
2004-11-11spaces at EOL in comments, spotted by theoHenning Brauer
2004-11-11NOTREACHED not not reached! Stupid me.Claudio Jeker
2004-11-11Store the local v4 and v6 address of a session. For IPv4 sessions the firstClaudio Jeker
IPv6 address with global scope of the interface used by the session is used. In any case the local endpoint of the session is used for one of the two no matter what scope. OK henning@
2004-11-11New config statement "rde route-age [evaluate|ignore]". If set to evaluateClaudio Jeker
the best path selection will not only be based on the path attributes but also on the age of the prefix. This is an extension to the RFC. The default is ignore but previously it was implicitly set to evaluate. OK henning@ man page OK jaredy@ jmc@
2004-09-28Add prepend-neighbor feature. Prepend the remote-as n times similar toClaudio Jeker
prepend-self. Only for incomming UPDATEs. OK henning@
2004-09-16imsg API cleanup:Henning Brauer
-kill imsg_compose_pid, imsg_compose_fdpass and imsg_create_pid -extend the original imsg_compose/_create API to take pid & fd too -make imsg_compose do imsg_create + imsg_add + imsg_close instead of duplicating the code -adjust all callers to the new API ok claudio
2004-09-16malloc the imsg buffers instead of having them staticly, suggested byHenning Brauer
micskye some time ago
2004-08-12Just ignore RFC2545 and the silly idea of using link local addresses asClaudio Jeker
nexthop. This makes the code a lot simpler. OK henning@
2004-08-10Gahhh, why is this still around? It was never necessary to inform the parentClaudio Jeker
after fd passing. I thought I removed that some time ago... anyway now it is gone.
2004-08-10switch nexthop in struct filter_set form struct in_addr to struct bgpd_addrClaudio Jeker
OK henning@
2004-08-06Monster diff to get one step closer to IPv6 support.Claudio Jeker
Cleanup path attribute handling. First of all kill struct attr_flags, all those infos are now in struct rde_aspath. Second move attribute parser functions into rde.c, rde_attr.c is shared between bgpd and bgpctl. Third reimplementation of the nexthop handling. Make it IPv6 ready and fix some major bug relating to "set nexthop". henning@ OK if it breaks nothing
2004-08-06Forward IMSG_CTL_SHOW_NEIGHBOR messages to the rde so that we can reportClaudio Jeker
the current and max prefix count back to bgpctl. OK henning@
2004-08-05The peer_l is not needed in the rde but still allocated, free them andClaudio Jeker
save 1k per peer. OK henning@
2004-08-05As usual cleanup on exit. OK henning@Claudio Jeker
2004-08-05Cleanup aspath specific functions and api. Mainly switch to a refcnt basedClaudio Jeker
allocation. This helps to save a bit of RAM. looks good henning@
2004-08-05struct prefix has a pointer to the peer so use it everywhere directly insteadClaudio Jeker
of the detour via aspath.