Skip to content

Commit

Permalink
Fix parsing of source prefix length in filters for IPv4 routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
boutier authored and Juliusz Chroboczek committed Jan 31, 2018
1 parent 0831261 commit 4f4e3cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,6 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
filter->af = af;
else if(filter->af != af)
goto error;
if(af == AF_INET && filter->action.src_plen == 96)
memset(&filter->action.src_prefix, 0, 16);
} else if(strcmp(token, "table") == 0) {
int table;
c = getint(c, &table, gnc, closure);
Expand All @@ -472,6 +470,8 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
} else if(filter->af == AF_INET) {
filter->plen_le += 96;
filter->plen_ge += 96;
filter->src_plen_le += 96;
filter->src_plen_ge += 96;
}
*filter_return = filter;
return c;
Expand Down

0 comments on commit 4f4e3cb

Please sign in to comment.