Commit 63542845 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Merge branch 'dev' into ospf3

Conflicts:

	proto/ospf/lsreq.c
	proto/ospf/lsupd.c
	proto/ospf/rt.c
parents 34a877cc 8a7fb885
Version 1.1.6 (2009-11-19)
o Implements RFC 5004 - prefer older external routes.
o There is a change how route servers handle missing IPv6 link
local addresses in next hop atribute - see 'missing lladdr'
option.
o Several minor features (description field, parse check option).
o Several minor bugfixes.
Version 1.1.5 (2009-10-29)
o Better scalability of BGP.
o New accessors for AS path - first and last.
......
......@@ -21,7 +21,6 @@ Globals
Various ideas
~~~~~~~~~~~~~
- client: paging of output
- client: Ctrl-R eats one more enter
- bgp: timing of updates?
- netlink: realms
......
......@@ -162,6 +162,7 @@ protocol static {
#protocol bgp {
# disabled;
# description "My BGP uplink"
# local as 65000;
# neighbor 62.168.0.130 as 5588;
# multihop 20 via 62.168.0.13;
......
......@@ -129,7 +129,11 @@ options. The most important ones are:
enable debug messages and run bird in foreground.
<tag>-D <m/filename of debug log/</tag>
log debugging information to given file instead of stderr
log debugging information to given file instead of stderr.
<tag>-p</tag>
just parse the config file and exit. Return value is zero if the config file is valid,
nonzero if there are some errors.
<tag>-s <m/name of communication socket/</tag>
use given filename for a socket for communications with the client, default is <it/prefix/<file>/var/run/bird.ctl</file>.
......@@ -306,6 +310,10 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
<tag>export <m/filter/</tag> This is similar to the <cf>import</cf> keyword, except that it
works in the direction from the routing table to the protocol. Default: <cf/none/.
<tag>description "<m/text/"</tag> This is an optional
description of the protocol. It is displayed as a part of the
output of 'show route all' command.
<tag>table <m/name/</tag> Connect this protocol to a non-default routing table.
</descrip>
......@@ -474,9 +482,6 @@ This argument can be omitted if there exists only a single instance.
number of networks, number of routes before and after filtering). If
you use <cf/count/ instead, only the statistics will be printed.
<tag>enable|disable|restart <m/name/|"<m/pattern/"|all</tag>
Enable, disable or restart a given protocol instance, instances matching the <cf><m/pattern/</cf> or <cf/all/ instances.
<tag>configure [soft] ["<m/config file/"]</tag>
Reload configuration from a given file. BIRD will smoothly
switch itself to the new configuration, protocols are
......@@ -488,6 +493,27 @@ This argument can be omitted if there exists only a single instance.
but new routes would be processed according to the new
filters.
<tag>enable|disable|restart <m/name/|"<m/pattern/"|all</tag>
Enable, disable or restart a given protocol instance, instances matching the <cf><m/pattern/</cf> or <cf/all/ instances.
<tag>reload [in|out] <m/name/|"<m/pattern/"|all</tag>
Reload a given protocol instance, that means re-import routes
from the protocol instance and re-export preferred routes to
the instance. If <cf/in/ or <cf/out/ options are used, the
command is restricted to one direction (re-import or
re-export).
This command is useful if appropriate filters have changed but
the protocol instance was not restarted (or reloaded),
therefore it still propagates the old set of routes. For example
when <cf/configure soft/ command was used to change filters.
Re-export always succeeds, but re-import is protocol-dependent
and might fail (for example, if BGP neighbor does not support
route-refresh extension). In that case, re-export is also
skipped.
<tag/down/
Shut BIRD down.
......@@ -641,7 +667,7 @@ incompatible with each other (that is to prevent you from shooting in the foot).
but <cf>1.0.0.0/16 &tilde; [ 1.0.0.0/8- ]</cf> is false.
Cisco-style patterns like <cf>10.0.0.0/8 ge 16 le 24</cf> can be expressed
in Bird as <cf>10.0.0.0/8{16,24}</cf>, <cf>192.168.0.0/16 le 24</cf> as
in BIRD as <cf>10.0.0.0/8{16,24}</cf>, <cf>192.168.0.0/16 le 24</cf> as
<cf>192.168.0.0/16{16,24}</cf> and <cf>192.168.0.0/16 ge 24</cf> as
<cf>192.168.0.0/16{24,32}</cf>.
......@@ -882,12 +908,28 @@ for each neighbor using the following configuration parameters:
we should route via our direct neighbor with address <m/ip/.
Default: switched off.
<tag>next hop self</tag> Avoid calculation of the Next Hop attribute
and always advertise our own source address (see below) as a next hop.
This needs to be used only
occasionally to circumvent misconfigurations of other routers.
<tag>next hop self</tag> Avoid calculation of the Next Hop
attribute and always advertise our own source address (see
below) as a next hop. This needs to be used only occasionally
to circumvent misconfigurations of other routers.
Default: disabled.
<tag>missing lladdr self|drop|ignore</tag>Next Hop attribute
in BGP-IPv6 sometimes contains just the global IPv6 address,
but sometimes it has to contain both global and link-local
IPv6 addresses. This option specifies what to do if BIRD have
to send both addresses but does not know link-local address.
This situation might happen when routes from other protocols
are exported to BGP, or when improper updates are received
from BGP peers. <cf/self/ means that BIRD advertises its own
local address instead. <cf/drop/ means that BIRD skips that
prefixes and logs error. <cf/ignore/ means that BIRD ignores
the problem and sends just the global address (and therefore
forms improper BGP update). Default: <cf/self/, unless BIRD
is configured as a route server (option <cf/rs client/), in
that case default is <cf/drop/, because route servers usually
does not forward packets ifselves.
<tag>source address <m/ip/</tag> Define local address we should use
for next hop calculation. Default: the address of the local end
of the interface our neighbor is connected to.
......@@ -915,11 +957,21 @@ for each neighbor using the following configuration parameters:
as a route server client. A route server is used as a
replacement for full mesh EBGP routing in Internet exchange
points in a similar way to route reflectors used in IBGP routing.
Bird does not implement obsoleted RFC 1863, but uses ad-hoc implementation,
BIRD does not implement obsoleted RFC 1863, but uses ad-hoc implementation,
which behaves like plain EBGP but reduces modifications to advertised route
attributes to be transparent (for example does not prepend its AS number to
AS PATH attribute and keep MED attribute). Default: disabled.
<tag>enable route refresh <m/switch/</tag> When BGP speaker
changes its import filter, it has to re-examine all routes
received from its neighbor against the new filter. As these
routes might not be available, there is a BGP protocol
extension Route Refresh (specified in RFC 2918) that allows
BGP speaker to request re-advertisment of all routes from its
neighbor. This option specifies whether BIRD advertises this
capability and accepts such requests. Even when disabled, BIRD
can send route refresh requests. Default: on.
<tag>enable as4 <m/switch/</tag> BGP protocol was designed to use 2B AS numbers
and was extended later to allow 4B AS number. BIRD supports 4B AS extension,
but by disabling this option it can be persuaded not to advertise it and
......@@ -980,6 +1032,11 @@ for each neighbor using the following configuration parameters:
<tag>path metric <m/switch/</tag> Enable comparison of path lengths
when deciding which BGP route is the best one. Default: on.
<tag>prefer older <m/switch/</tag> Standard route selection algorithm
breaks ties by comparing router IDs. This changes the behavior
to prefer older routes (when both are external and from different
peer). For details, see RFC 5004. Default: off.
<tag>default bgp_med <m/number/</tag> Value of the Multiple Exit
Discriminator to be used during route selection when the MED attribute
is missing. Default: 0.
......
......@@ -23,6 +23,7 @@ Reply codes of BIRD command-line interface
0012 Restarted
0013 Status report
0014 Route count
0015 Reloading
1000 BIRD version
1001 Interface list
......@@ -40,6 +41,7 @@ Reply codes of BIRD command-line interface
1013 Show ospf neighbors
1014 Show ospf
1015 Show ospf interface
1016 Show ospf state/topology
8000 Reply too long
8001 Route not found
......@@ -47,6 +49,7 @@ Reply codes of BIRD command-line interface
8003 No protocols match
8004 Stopped due to reconfiguration
8005 Protocol is down => cannot dump
8006 Reload failed
9000 Command too long
9001 Parse error
......
......@@ -731,7 +731,7 @@ interpret(struct f_inst *what)
case P('a','f'): /* Get first ASN from AS PATH */
ONEARG;
if (v1.type != T_PATH)
runtime( "AS Path expected" );
runtime( "AS path expected" );
as = 0;
as_path_get_first(v1.val.ad, &as);
......@@ -942,6 +942,8 @@ i_same(struct f_inst *f1, struct f_inst *f2)
case P('i','M'): TWOARGS; break;
case P('A','p'): TWOARGS; break;
case P('C','a'): TWOARGS; break;
case P('a','f'):
case P('a','l'): ONEARG; break;
default:
bug( "Unknown instruction %d in same (%c)", f1->code, f1->code & 0xff);
}
......
Summary: BIRD Internet Routing Daemon
Name: bird
Version: 1.1.5
Version: 1.1.6
Release: 1
Copyright: GPL
Group: Networking/Daemons
......
......@@ -44,7 +44,8 @@ CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE)
CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS)
CF_KEYWORDS(LISTEN, BGP, V6ONLY, ADDRESS, PORT, PASSWORDS, DESCRIPTION)
CF_KEYWORDS(RELOAD, IN, OUT)
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
RIP, OSPF, OSPF_IA, OSPF_EXT1, OSPF_EXT2, BGP, PIPE)
......@@ -141,6 +142,7 @@ proto_item:
| EXPORT imexport { this_proto->out_filter = $2; }
| TABLE rtable { this_proto->table = $2; }
| ROUTER ID idval { this_proto->router_id = $3; }
| DESCRIPTION TEXT { this_proto->dsc = $2; }
;
imexport:
......@@ -436,11 +438,17 @@ echo_size:
;
CF_CLI(DISABLE, proto_patt, <protocol> | \"<pattern>\" | all, [[Disable protocol]])
{ proto_xxable($2, 0); } ;
{ proto_xxable($2, XX_DISABLE); } ;
CF_CLI(ENABLE, proto_patt, <protocol> | \"<pattern>\" | all, [[Enable protocol]])
{ proto_xxable($2, 1); } ;
{ proto_xxable($2, XX_ENABLE); } ;
CF_CLI(RESTART, proto_patt, <protocol> | \"<pattern>\" | all, [[Restart protocol]])
{ proto_xxable($2, 2); } ;
{ proto_xxable($2, XX_RESTART); } ;
CF_CLI(RELOAD, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol]])
{ proto_xxable($2, XX_RELOAD); } ;
CF_CLI(RELOAD IN, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just imported routes)]])
{ proto_xxable($3, XX_RELOAD_IN); } ;
CF_CLI(RELOAD OUT, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just exported routes)]])
{ proto_xxable($3, XX_RELOAD_OUT); } ;
CF_CLI_HELP(DEBUG, ..., [[Control protocol debugging]])
CF_CLI(DEBUG, proto_patt debug_mask, (<protocol> | <pattern> | all) (all | off | { states | routes | filters | events | packets }), [[Control protocol debugging]])
......
......@@ -73,6 +73,10 @@ proto_relink(struct proto *p)
rem_node(&p->n);
switch (p->core_state)
{
case FS_HUNGRY:
l = &inactive_proto_list;
break;
case FS_FEEDING:
case FS_HAPPY:
l = &active_proto_list;
break;
......@@ -80,7 +84,7 @@ proto_relink(struct proto *p)
l = &flush_proto_list;
break;
default:
l = &inactive_proto_list;
ASSERT(0);
}
proto_enqueue(l, p);
}
......@@ -307,6 +311,7 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
if (sym && sym->class == SYM_PROTO && !new->shutdown)
{
/* Found match, let's check if we can smoothly switch to new configuration */
/* No need to check description */
nc = sym->def;
if (!force_reconfig
&& nc->protocol == oc->protocol
......@@ -548,7 +553,7 @@ proto_feed_more(void *P)
}
static void
proto_feed(void *P)
proto_feed_initial(void *P)
{
struct proto *p = P;
......@@ -576,15 +581,50 @@ proto_schedule_flush(struct proto *p)
}
static void
proto_schedule_feed(struct proto *p)
proto_schedule_feed(struct proto *p, int initial)
{
DBG("%s: Scheduling meal\n", p->name);
p->core_state = FS_FEEDING;
p->refeeding = !initial;
/* Hack: reset exp_routes during refeed, and do not decrease it later */
if (!initial)
p->stats.exp_routes = 0;
proto_relink(p);
p->attn->hook = proto_feed;
p->attn->hook = initial ? proto_feed_initial : proto_feed_more;
ev_schedule(p->attn);
}
/**
* proto_request_feeding - request feeding routes to the protocol
* @p: given protocol
*
* Sometimes it is needed to send again all routes to the
* protocol. This is called feeding and can be requested by this
* function. This would cause protocol core state transition
* to FS_FEEDING (during feeding) and when completed, it will
* switch back to FS_HAPPY. This function can be called even
* when feeding is already running, in that case it is restarted.
*/
void
proto_request_feeding(struct proto *p)
{
ASSERT(p->proto_state == PS_UP);
/* If we are already feeding, we want to restart it */
if (p->core_state == FS_FEEDING)
{
/* Unless feeding is in initial state */
if (p->attn->hook == proto_feed_initial)
return;
rt_feed_baby_abort(p);
}
proto_schedule_feed(p, 0);
}
/**
* proto_notify_state - notify core about protocol state change
* @p: protocol the state of which has changed
......@@ -614,7 +654,7 @@ proto_notify_state(struct proto *p, unsigned ps)
switch (ps)
{
case PS_DOWN:
if ((cs = FS_FEEDING) || (cs == FS_HAPPY))
if ((cs == FS_FEEDING) || (cs == FS_HAPPY))
proto_schedule_flush(p);
neigh_prune(); // FIXME convert neighbors to resource?
......@@ -634,10 +674,10 @@ proto_notify_state(struct proto *p, unsigned ps)
case PS_UP:
ASSERT(ops == PS_DOWN || ops == PS_START);
ASSERT(cs == FS_HUNGRY);
proto_schedule_feed(p);
proto_schedule_feed(p, 1);
break;
case PS_STOP:
if ((cs = FS_FEEDING) || (cs == FS_HAPPY))
if ((cs == FS_FEEDING) || (cs == FS_HAPPY))
proto_schedule_flush(p);
break;
default:
......@@ -702,6 +742,8 @@ proto_do_show(struct proto *p, int verbose)
buf);
if (verbose)
{
if (p->cf->dsc)
cli_msg(-1006, " Description: %s", p->cf->dsc);
cli_msg(-1006, " Preference: %d", p->preference);
cli_msg(-1006, " Input filter: %s", filter_name(p->in_filter));
cli_msg(-1006, " Output filter: %s", filter_name(p->out_filter));
......@@ -788,25 +830,29 @@ proto_xxable(char *pattern, int xx)
cnt++;
switch (xx)
{
case 0:
case XX_DISABLE:
if (p->disabled)
cli_msg(-8, "%s: already disabled", p->name);
else
{
cli_msg(-9, "%s: disabled", p->name);
p->disabled = 1;
proto_rethink_goal(p);
}
break;
case 1:
case XX_ENABLE:
if (!p->disabled)
cli_msg(-10, "%s: already enabled", p->name);
else
{
cli_msg(-11, "%s: enabled", p->name);
p->disabled = 0;
proto_rethink_goal(p);
}
break;
case 2:
case XX_RESTART:
if (p->disabled)
cli_msg(-8, "%s: already disabled", p->name);
else
......@@ -814,13 +860,38 @@ proto_xxable(char *pattern, int xx)
p->disabled = 1;
proto_rethink_goal(p);
p->disabled = 0;
proto_rethink_goal(p);
cli_msg(-12, "%s: restarted", p->name);
}
break;
case XX_RELOAD:
case XX_RELOAD_IN:
case XX_RELOAD_OUT:
if (p->disabled)
{
cli_msg(-8, "%s: already disabled", p->name);
break;
}
/* re-importing routes */
if (xx != XX_RELOAD_OUT)
if (! (p->reload_routes && p->reload_routes(p)))
{
cli_msg(-8006, "%s: reload failed", p->name);
break;
}
/* re-exporting routes */
if (xx != XX_RELOAD_IN)
proto_request_feeding(p);
cli_msg(-15, "%s: reloading", p->name);
break;
default:
ASSERT(0);
}
proto_rethink_goal(p);
}
WALK_PROTO_LIST_END;
if (!cnt)
......
......@@ -81,6 +81,7 @@ struct proto_config {
struct protocol *protocol; /* Protocol */
struct proto *proto; /* Instance we've created */
char *name;
char *dsc;
unsigned debug, preference, disabled; /* Generic parameters */
u32 router_id; /* Protocol specific router ID */
struct rtable_config *table; /* Table we're attached to */
......@@ -133,6 +134,7 @@ struct proto {
unsigned core_state; /* Core state machine (see below) */
unsigned core_goal; /* State we want to reach (see below) */
unsigned reconfiguring; /* We're shutting down due to reconfiguration */
unsigned refeeding; /* We are refeeding (valid only if core_state == FS_FEEDING) */
u32 hash_key; /* Random key used for hashing of neighbors */
bird_clock_t last_state_change; /* Time of last state transition */
char *last_state_name_announced; /* Last state name we've announced to the user */
......@@ -151,6 +153,9 @@ struct proto {
* It can construct a new rte, add private attributes and
* decide whether the route shall be imported: 1=yes, -1=no,
* 0=process it through the import filter set by the user.
* reload_routes Request protocol to reload all its routes to the core
* (using rte_update()). Returns: 0=reload cannot be done,
* 1= reload is scheduled and will happen (asynchronously).
*/
void (*if_notify)(struct proto *, unsigned flags, struct iface *i);
......@@ -160,6 +165,7 @@ struct proto {
struct ea_list *(*make_tmp_attrs)(struct rte *rt, struct linpool *pool);
void (*store_tmp_attrs)(struct rte *rt, struct ea_list *attrs);
int (*import_control)(struct proto *, struct rte **rt, struct ea_list **attrs, struct linpool *pool);
int (*reload_routes)(struct proto *);
/*
* Routing entry hooks (called only for rte's belonging to this protocol):
......@@ -189,11 +195,19 @@ struct proto {
void *proto_new(struct proto_config *, unsigned size);
void *proto_config_new(struct protocol *, unsigned size);
void proto_request_feeding(struct proto *p);
void proto_show(struct symbol *, int);
struct proto *proto_get_named(struct symbol *, struct protocol *);
void proto_xxable(char *, int);
void proto_debug(char *, unsigned int);
#define XX_DISABLE 0
#define XX_ENABLE 1
#define XX_RESTART 2
#define XX_RELOAD 3
#define XX_RELOAD_IN 4
#define XX_RELOAD_OUT 5
static inline u32
proto_get_router_id(struct proto_config *pc)
{
......@@ -270,6 +284,10 @@ void proto_notify_state(struct proto *p, unsigned state);
* HUNGRY/DOWN --> HUNGRY/START --> HUNGRY/UP -->
* FEEDING/UP --> HAPPY/UP --> FLUSHING/STOP|DOWN -->
* HUNGRY/STOP|DOWN --> HUNGRY/DOWN
*
* Sometimes, protocol might switch from HAPPY/UP to FEEDING/UP
* if it wants to refeed the routes (for example BGP does so
* as a result of received ROUTE-REFRESH request).
*/
#define FS_HUNGRY 0
......
......@@ -158,13 +158,15 @@ rte_trace_out(unsigned int flag, struct proto *p, rte *e, char *msg)
}
static inline void
do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old, ea_list *tmpa, int class)
do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old, ea_list *tmpa, int class, int refeed)
{
struct proto *p = a->proto;
rte *new0 = new;
rte *old0 = old;
int ok;
int fast_exit_hack = 0;
if (new)
{
p->stats.exp_updates_received++;
......@@ -174,6 +176,7 @@ do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old,
{
p->stats.exp_updates_rejected++;
drop_reason = "out of scope";
fast_exit_hack = 1;
}
else if ((ok = p->import_control ? p->import_control(p, &new, &tmpa, rte_update_pool) : 0) < 0)
{
......@@ -199,7 +202,32 @@ do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old,
else
p->stats.exp_withdraws_received++;
if (old)
/* Hack: This is here to prevent 'spurious withdraws'
for loopback addresses during reload. */
if (fast_exit_hack)
return;
/*
* This is a tricky part - we don't know whether route 'old' was
* exported to protocol 'p' or was filtered by the export filter.
* We try tu run the export filter to know this to have a correct
* value in 'old' argument of rt_update (and proper filter value)
*
* FIXME - this is broken because 'configure soft' may change
* filters but keep routes. Refeed is expected to be called after
* change of the filters and with old == new, therefore we do not
* even try to run the filter on an old route, This may lead to
* 'spurious withdraws' but ensure that there are no 'missing
* withdraws'.
*
* This is not completely safe as there is a window between
* reconfiguration and the end of refeed - if a newly filtered
* route disappears during this period, proper withdraw is not
* sent (because old would be also filtered) and the route is
* not refeeded (because it disappeared before that).
*/
if (old && !refeed)
{
if (p->out_filter == FILTER_REJECT)
old = NULL;
......@@ -216,6 +244,7 @@ do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old,
}
}
/* FIXME - This is broken because of incorrect 'old' value (see above) */
if (!new && !old)
return;
......@@ -224,9 +253,11 @@ do_rte_announce(struct announce_hook *a, int type, net *net, rte *new, rte *old,
else
p->stats.exp_withdraws_accepted++;
/* Hack: We do not decrease exp_routes during refeed, we instead
reset exp_routes at the start of refeed. */
if (new)
p->stats.exp_routes++;
if (old)
if (old && !refeed)
p->stats.exp_routes--;
if (p->debug & D_ROUTES)
......@@ -304,7 +335,7 @@ rte_announce(rtable *tab, int type, net *net, rte *new, rte *old, ea_list *tmpa)
{
ASSERT(a->proto->core_state == FS_HAPPY || a->proto->core_state == FS_FEEDING);
if (a->proto->accept_ra_types == type)
do_rte_announce(a, type, net, new, old, tmpa, class);
do_rte_announce(a, type, net, new, old, tmpa, class, 0);
}
}
......@@ -394,6 +425,26 @@ rte_recalculate(rtable *table, net *net, struct proto *p, struct proto *src, rte
{
if (old->attrs->proto == src)
{
/* If there is the same route in the routing table but from
* a different sender, then there are two paths from the
* source protocol to this routing table through transparent
* pipes, which is not allowed.
*
* We log that and ignore the route. If it is withdraw, we
* ignore it completely (there might be 'spurious withdraws',
* see FIXME in do_rte_announce())
*/
if (old->sender != p)
{
if (new)
{
log(L_ERR "Pipe collision detected when sending %I/%d to table %s",
net->n.prefix, net->n.pxlen, table->name);
rte_free_quick(new);
}
return;
}
if (new && rte_same(old, new))
{
/* No changes, ignore the new route */
......@@ -495,11 +546,10 @@ rte_recalculate(rtable *table, net *net, struct proto *p, struct proto *src, rte
net->routes->next = new;
rte_trace_in(D_ROUTES, p, new, "added");
}
else if (old && (p->debug & D_ROUTES))
{
/* Not really a case - the list of routes is correct, we just
log the route removal */
/* Log the route removal */
if (!new && old && (p->debug & D_ROUTES))
{
if (old != old_best)
rte_trace_in(D_ROUTES, p, old, "removed");
else if (net->routes)
......@@ -589,11 +639,12 @@ rte_update(rtable *table, net *net, struct proto *p, struct proto *src, rte *new
new->sender = p;
struct filter *filter = p->in_filter;
/* Do not filter routes going to the secondary side of the pipe,
that should only go through export filter.
FIXME Make a better check whether p is really a pipe. */
if (p->table != table)
/* Do not filter routes going through the pipe,
they are filtered in the export filter only. */