Permalink
Browse files

Apply bugfix from the fake-nat64 branch

One of the bugs I ran into while testing the fake NAT64 also
applied to the real NAT64.

The bug prevents the mask iteration lookup to wrap correctly.
Connections victimized by this faced packet drops.
  • Loading branch information...
ydahhrk committed Sep 9, 2017
1 parent 000c3ec commit 3de64b8e694131893c9a59fa506c02265bb31bf0
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/stateful/pool4/db.c
View
@@ -933,7 +933,7 @@ int mask_domain_next(struct mask_domain *masks,
if (masks->current_port > masks->current_range->ports.max) {
*consecutive = false;
masks->current_range++;
if (masks->current_range > first_domain_entry(masks) + masks->range_count)
if (masks->current_range >= first_domain_entry(masks) + masks->range_count)
masks->current_range = first_domain_entry(masks);
masks->current_port = masks->current_range->ports.min;
} else {

0 comments on commit 3de64b8

Please sign in to comment.