From fe9f1a6dedda6bab23cbb605d1cd5db6cd3e2468 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 5 Nov 2015 12:48:52 +0100 Subject: 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. --- proto/ospf/iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'proto/ospf/iface.c') diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 77ce839a..3c0cee18 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -67,7 +67,9 @@ ifa_flood_queue_size(struct ospf_iface *ifa) int ospf_iface_assure_bufsize(struct ospf_iface *ifa, uint plen) { - plen += SIZE_OF_IP_HEADER; + struct ospf_proto *p = ifa->oa->po; + + plen += ospf_is_v2(p) ? IP4_HEADER_LENGTH : IP6_HEADER_LENGTH; /* This is relevant just for OSPFv2 */ if (ifa->autype == OSPF_AUTH_CRYPT) -- cgit v1.2.3