diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-11-05 12:48:52 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-11-05 12:48:52 +0100 |
commit | fe9f1a6dedda6bab23cbb605d1cd5db6cd3e2468 (patch) | |
tree | d6ea417b7ed16c90b29634fe075e51508dec87d9 /filter/filter.c | |
parent | 8eb8e546dc8cc647fcfa4a3a17dfa8ab36b00958 (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 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/filter/filter.c b/filter/filter.c index 55062aca..1383961c 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -792,8 +792,8 @@ interpret(struct f_inst *what) { case SA_FROM: res.val.px.ip = rta->from; break; case SA_GW: res.val.px.ip = rta->gw; break; - case SA_NET: res.val.px.ip = (*f_rte)->net->n.prefix; - res.val.px.len = (*f_rte)->net->n.pxlen; break; + case SA_NET: res.val.px.ip = net_prefix((*f_rte)->net->n.addr); + res.val.px.len = net_pxlen((*f_rte)->net->n.addr); break; case SA_PROTO: res.val.s = rta->src->proto->name; break; case SA_SOURCE: res.val.i = rta->source; break; case SA_SCOPE: res.val.i = rta->scope; break; @@ -1292,8 +1292,8 @@ interpret(struct f_inst *what) else { ACCESS_RTE; - v1.val.px.ip = (*f_rte)->net->n.prefix; - v1.val.px.len = (*f_rte)->net->n.pxlen; + v1.val.px.ip = net_prefix((*f_rte)->net->n.addr); + v1.val.px.len = net_pxlen((*f_rte)->net->n.addr); /* We ignore temporary attributes, probably not a problem here */ /* 0x02 is a value of BA_AS_PATH, we don't want to include BGP headers */ |