summaryrefslogtreecommitdiff
path: root/proto/radv/radv.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-11-05 12:48:52 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-11-05 12:48:52 +0100
commitfe9f1a6dedda6bab23cbb605d1cd5db6cd3e2468 (patch)
treed6ea417b7ed16c90b29634fe075e51508dec87d9 /proto/radv/radv.c
parent8eb8e546dc8cc647fcfa4a3a17dfa8ab36b00958 (diff)
Initial commit on integrated BIRD
New data types net_addr and variants (in lib/net.h) describing network addresses (prefix/pxlen). Modifications of FIB structures to handle these data types and changing everything to use these data types instead of prefix/pxlen pairs where possible. The commit is WiP, some protocols are not yet updated (BGP, Kernel), and the code contains some temporary scaffolding. Comments are welcome.
Diffstat (limited to 'proto/radv/radv.c')
-rw-r--r--proto/radv/radv.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index 6370e006..2de89991 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -258,9 +258,7 @@ radv_ifa_notify(struct proto *p, unsigned flags, struct ifa *a)
static inline int radv_net_match_trigger(struct radv_config *cf, net *n)
{
- return cf->trigger_valid &&
- (n->n.pxlen == cf->trigger_pxlen) &&
- ipa_equal(n->n.prefix, cf->trigger_prefix);
+ return cf->trigger_valid && net_equal(n->n.addr, cf->trigger);
}
int
@@ -306,8 +304,7 @@ radv_check_active(struct proto_radv *ra)
if (! cf->trigger_valid)
return 1;
- return rt_examine(ra->p.table, cf->trigger_prefix, cf->trigger_pxlen,
- &(ra->p), ra->p.cf->out_filter);
+ return rt_examine(ra->p.table, cf->trigger, &ra->p, ra->p.cf->out_filter);
}
static struct proto *