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)
Fri, Apr 26, 7:36 AM
Unknown Object (File)
Fri, Apr 26, 7:36 AM
Unknown Object (File)
Jan 10 2024, 1:26 AM
Unknown Object (File)
Dec 20 2023, 4:41 PM
Unknown Object (File)
Dec 6 2023, 11:06 PM
Unknown Object (File)
Sep 5 2023, 5:47 PM
Unknown Object (File)
Sep 4 2023, 9:47 PM
Unknown Object (File)
Aug 27 2023, 6:52 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
Lint Skipped
Unit
Tests Skipped

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).