Commit 1ffff57e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix parsing of source length in filters.

This fixes a bug that was introduced in commit 4f4e3cba, and prevented
non-source-specific IPv4 routes from being redistributed.  Thanks
to Niklas Yann Wettengel for the detective work.
parent b55bd9a4
......@@ -479,10 +479,14 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
filter->src_plen_le < 128 || filter->src_plen_ge > 0)
filter->af = AF_INET6;
} else if(filter->af == AF_INET) {
filter->plen_le += 96;
filter->plen_ge += 96;
filter->src_plen_le += 96;
filter->src_plen_ge += 96;
if(filter->plen_le < 128)
filter->plen_le += 96;
if(filter->plen_ge > 0)
filter->plen_ge += 96;
if(filter->src_plen_le < 128)
filter->src_plen_le += 96;
if(filter->src_plen_ge > 0)
filter->src_plen_ge += 96;
}
*filter_return = filter;
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