nat: fix dhcp client on outside interface with output feature 17/24317/2
authorAlexander Chernavin <achernavin@netgate.com>
Tue, 14 Jan 2020 11:11:42 +0000 (06:11 -0500)
committerOle Trøan <otroan@employees.org>
Tue, 21 Jan 2020 10:25:32 +0000 (10:25 +0000)
commit54eda4bcb80cfbaee16b26fad521d6ead5e0a518
treebf213851355b8b898b39a7d296582c8a3c3b4ef3
parent2b4e7401499cdc7d51dec027745e0228d3f07b64
nat: fix dhcp client on outside interface with output feature

There was an attempt to fix this problem in the commit:
d3b8c861a44e70c197ab721fa3ce7f38bbeab7fd

But checking the LOCALLY_ORIGINATED flag didn't work because this flag
gets reset before it can reach the NAT nodes.

With this commit, replace the check for the LOCALLY_ORIGINATED flag
with a check to see if the packet is a DHCP broadcast.

Type: fix

Change-Id: I069c08a785b5988b10192f528e4f9c4c7cc2f8a3
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
src/plugins/nat/in2out.c
src/plugins/nat/in2out_ed.c