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, Jul 4, 8:21 AM
Unknown Object (File)
Jun 17 2025, 5:15 PM
Unknown Object (File)
Jun 15 2025, 4:58 PM
Unknown Object (File)
Jun 9 2025, 10:09 PM
Unknown Object (File)
Jun 4 2025, 2:53 PM
Unknown Object (File)
May 30 2025, 8:26 AM
Unknown Object (File)
May 24 2025, 10:22 AM
Unknown Object (File)
May 18 2025, 10:34 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).