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)
Dec 10 2024, 3:05 PM
Unknown Object (File)
Dec 6 2024, 7:13 AM
Unknown Object (File)
Dec 6 2024, 7:11 AM
Unknown Object (File)
Nov 30 2024, 8:53 PM
Unknown Object (File)
Nov 26 2024, 1:54 PM
Unknown Object (File)
Nov 16 2024, 8:46 PM
Unknown Object (File)
Nov 11 2024, 4:41 PM
Unknown Object (File)
Oct 2 2024, 10:33 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).