rha at open
May 9, 2012, 12:35 AM
Post #1 of 2
Re: [PATCH] lib: drop heuristic IPv6 address recognitio
I am running the patch I submitted back in September 2010 since a long
time now and it caused now havoc.
Please consider including it into the main stream repo.
-- snip --
* command.c: (cmd_ipv6_match) Drop IPv6 address recognition
heuristics and solely rely on inet_pton, because strings
like "abcd" were mistaken for IPv6 addresses.
This affects e.g. the command "neighbour WORD peer-group",
which won't work with words consisting of up to 4 characters
between 'a' and 'f' and digits.
lib/command.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/lib/command.c b/lib/command.c
index 478125f..2ed1964 100644
@@ -870,6 +870,20 @@ cmd_ipv6_match (const char *str)
if (ret == 1)
+ return no_match;
+ The following code is too heuristic. It mistakes strings up to
+ 4 characters long and consisting of letters a-f and numbers for
+ IPv6 addresses.
+ This causes commands like this one to fail:
+ conf term
+ router bgp 65444
+ neighbor abcd peer-group
+ % Command incomplete.
while (*str != '\0')
@@ -950,6 +964,7 @@ cmd_ipv6_match (const char *str)
#endif /* 0 */
+#endif /* 0 */
static enum match_type
-- snap --
Quagga-dev mailing list
Quagga-dev [at] lists