diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-30 13:29:34 +0200 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2017-04-12 16:04:22 +0200 |
commit | ffb38dfb8b454dc23cd08836d7236a5a9c9f80c1 (patch) | |
tree | 320b828347d5aee9fc36227ca2e456494d74cac3 /proto/bgp/bgp.c | |
parent | 2faf519cf9d34f90d59081ee5f8d6976c62f4f6e (diff) |
Static: Support for dual-AF IGP tables
When recursive routes with hybrid next hops (e.g. IPv6 route with IPv4 next
hop) are allowed, we need both IPv4 and IPv6 IGP tables.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 01ac5453..86f7be1b 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1732,6 +1732,8 @@ bgp_reconfigure(struct proto *P, struct proto_config *CF) return same; } +#define IGP_TABLE(cf, sym) ((cf)->igp_table_##sym ? (cf)->igp_table_##sym ->table : NULL ) + static int bgp_channel_reconfigure(struct channel *C, struct channel_config *CC) { @@ -1746,12 +1748,8 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC) return 0; /* Check change in IGP tables */ - rtable *old4 = old->igp_table_ip4 ? old->igp_table_ip4->table : NULL; - rtable *old6 = old->igp_table_ip6 ? old->igp_table_ip6->table : NULL; - rtable *new4 = new->igp_table_ip4 ? new->igp_table_ip4->table : NULL; - rtable *new6 = new->igp_table_ip6 ? new->igp_table_ip6->table : NULL; - - if ((old4 != new4) || (old6 != new6)) + if ((IGP_TABLE(old, ip4) != IGP_TABLE(new, ip4)) || + (IGP_TABLE(old, ip6) != IGP_TABLE(new, ip6))) return 0; c->cf = new; |