Page MenuHomeFreeBSD

Allow ipfw_nat to handle an unconfigured interface.
ClosedPublic

Authored by jhb on Jan 15 2015, 4:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 8:46 PM
Unknown Object (File)
Mon, Nov 11, 4:41 PM
Unknown Object (File)
Oct 2 2024, 10:33 AM
Unknown Object (File)
Sep 27 2024, 12:50 AM
Unknown Object (File)
Sep 24 2024, 5:34 AM
Unknown Object (File)
Sep 22 2024, 10:53 AM
Unknown Object (File)
Sep 21 2024, 7:10 AM
Unknown Object (File)
Sep 17 2024, 2:28 AM
Subscribers

Details

Summary

natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address. This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.

Test Plan
  • Boot my laptop which NATs over wlan0 to allow VM guests to access the outside world. ipfw is configured before wpa_supplicant/dhclient have had a chance to configure wlan0. With natd this works fine. With ipfw_nat, the nat rules fail to install causing ipfw to exit and not install the full rule set, leaving me with a default deny rule.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

jhb retitled this revision from to Allow ipfw_nat to handle an unconfigured interface..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
melifaro added a reviewer: melifaro.
melifaro added a subscriber: melifaro.

Looks fine to me.

This revision is now accepted and ready to land.Jan 15 2015, 5:02 PM
glebius added a reviewer: glebius.
glebius added a subscriber: glebius.

I use pf(4) for VM guests, though ;)

gnn added a reviewer: gnn.
jhb updated this revision to Diff 3430.

Closed by commit rS277714 (authored by @jhb).