Commit 4f4e3cba authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Fix parsing of source prefix length in filters for IPv4 routes.

parent 08312612
...@@ -451,8 +451,6 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return) ...@@ -451,8 +451,6 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
filter->af = af; filter->af = af;
else if(filter->af != af) else if(filter->af != af)
goto error; goto error;
if(af == AF_INET && filter->action.src_plen == 96)
memset(&filter->action.src_prefix, 0, 16);
} else if(strcmp(token, "table") == 0) { } else if(strcmp(token, "table") == 0) {
int table; int table;
c = getint(c, &table, gnc, closure); c = getint(c, &table, gnc, closure);
...@@ -472,6 +470,8 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return) ...@@ -472,6 +470,8 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
} else if(filter->af == AF_INET) { } else if(filter->af == AF_INET) {
filter->plen_le += 96; filter->plen_le += 96;
filter->plen_ge += 96; filter->plen_ge += 96;
filter->src_plen_le += 96;
filter->src_plen_ge += 96;
} }
*filter_return = filter; *filter_return = filter;
return c; return c;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment