summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/flowspec_test.c4
-rw-r--r--lib/net.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/flowspec_test.c b/lib/flowspec_test.c
index 69bc279d..dd71dc7b 100644
--- a/lib/flowspec_test.c
+++ b/lib/flowspec_test.c
@@ -70,8 +70,8 @@ t_first_part(void)
net_addr_flow4 *f;
NET_ADDR_FLOW4_(f, ip4_build(10,0,0,1), 24, ((byte[]) { 0x00, 0x00, 0xab }));
- const byte const *under240 = &f->data[1];
- const byte const *above240 = &f->data[2];
+ const byte *under240 = &f->data[1];
+ const byte *above240 = &f->data[2];
/* Case 0x00 0x00 */
bt_assert(flow4_first_part(f) == NULL);
diff --git a/lib/net.h b/lib/net.h
index 4b2077ae..69f00641 100644
--- a/lib/net.h
+++ b/lib/net.h
@@ -358,10 +358,10 @@ static inline int net_zero_roa6(const net_addr_roa6 *a)
{ return !a->pxlen && ip6_zero(a->prefix) && !a->max_pxlen && !a->asn; }
static inline int net_zero_flow4(const net_addr_flow4 *a)
-{ return !a->pxlen && ip4_zero(a->prefix) && !a->data; }
+{ return !a->pxlen && ip4_zero(a->prefix) && (a->length == sizeof(net_addr_flow4)); }
static inline int net_zero_flow6(const net_addr_flow6 *a)
-{ return !a->pxlen && ip6_zero(a->prefix) && !a->data; }
+{ return !a->pxlen && ip6_zero(a->prefix) && (a->length == sizeof(net_addr_flow6)); }
static inline int net_zero_mpls(const net_addr_mpls *a)
{ return !a->label; }