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 /sysdep/linux | |
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 'sysdep/linux')
-rw-r--r-- | sysdep/linux/netlink.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 674d338b..6d99b0e8 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -911,8 +911,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) ra.nexthops = nl_parse_multipath(p, a[RTA_MULTIPATH]); if (!ra.nexthops) { - log(L_ERR "KRT: Received strange multipath route %I/%d", - net->n.prefix, net->n.pxlen); + log(L_ERR "KRT: Received strange multipath route %N", net->n.addr); return; } @@ -922,8 +921,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) ra.iface = if_find_by_index(oif); if (!ra.iface) { - log(L_ERR "KRT: Received route %I/%d with unknown ifindex %u", - net->n.prefix, net->n.pxlen, oif); + log(L_ERR "KRT: Received route %N with unknown ifindex %u", net->n.addr, oif); return; } @@ -944,8 +942,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) (i->rtm_flags & RTNH_F_ONLINK) ? NEF_ONLINK : 0); if (!ng || (ng->scope == SCOPE_HOST)) { - log(L_ERR "KRT: Received route %I/%d with strange next-hop %I", - net->n.prefix, net->n.pxlen, ra.gw); + log(L_ERR "KRT: Received route %N with strange next-hop %I", net->n.addr, ra.gw); return; } } @@ -1020,8 +1017,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) if (nl_parse_metrics(a[RTA_METRICS], metrics, ARRAY_SIZE(metrics)) < 0) { - log(L_ERR "KRT: Received route %I/%d with strange RTA_METRICS attribute", - net->n.prefix, net->n.pxlen); + log(L_ERR "KRT: Received route %N with strange RTA_METRICS attribute", net->n.addr); return; } |