mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Don't get stuck in an infinite loop comparing (short++ <= maxshort)
PR: 136893 Submitted by: Aragon Gouveia - aragon at phat dot za dot net (mostly) Approved by: re (kib) MFC after: 3 weeks
This commit is contained in:
parent
006e9db452
commit
8e41399c8f
1 changed files with 2 additions and 3 deletions
|
|
@ -175,7 +175,7 @@ nat_RedirectPort(struct cmdargs const *arg)
|
|||
return -1;
|
||||
}
|
||||
|
||||
while (laliasport <= haliasport) {
|
||||
do {
|
||||
link = LibAliasRedirectPort(la, localaddr, htons(llocalport),
|
||||
remoteaddr, htons(lremoteport),
|
||||
aliasaddr, htons(laliasport),
|
||||
|
|
@ -187,10 +187,9 @@ nat_RedirectPort(struct cmdargs const *arg)
|
|||
return 1;
|
||||
}
|
||||
llocalport++;
|
||||
laliasport++;
|
||||
if (hremoteport)
|
||||
lremoteport++;
|
||||
}
|
||||
} while (laliasport++ < haliasport);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue