From 0f88200247cc61175c7a1d98a3e935aedce93f3b Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Mon, 18 Nov 2019 17:44:34 +0100 Subject: BGP: Fix processing of IPv6 Flowspec During NLRI parsing of IPv6 Flowspec, dst prefix was not properly extracted from NLRI, therefore a received flow was stored in a different position in flowspec routing table, and was not reachable by command 'show route '. Add proper prefix part accessors to flowspec code and use them from BGP NLRI parsing code. Thanks to Alex D. for the bugreport. --- lib/flowspec.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/flowspec.h') diff --git a/lib/flowspec.h b/lib/flowspec.h index fa90c70d..d486cda0 100644 --- a/lib/flowspec.h +++ b/lib/flowspec.h @@ -85,6 +85,14 @@ const byte *flow4_next_part(const byte *pos, const byte *end); const byte *flow6_next_part(const byte *pos, const byte *end); +/* + * Flowspec accessors + */ + +ip4_addr flow_read_ip4_part(const byte *part); +ip6_addr flow_read_ip6_part(const byte *part); + + /* * Flowspec Builder */ -- cgit v1.2.3