Re: How do people use npf with dhcpcd?
David Brownlee <[email protected]>
| Newsgroups | gmane.os.netbsd.current |
|---|---|
| Message-ID | <CAGN_6paKdorTX-hpiZ9JbC0jTZEK3A1f+3B1M6cc+f2yQp706g@mail.gmail.com> |
On Fri, 26 Dec 2025 at 23:44, RVP <[email protected]> wrote: > > On Fri, 26 Dec 2025, David Brownlee wrote: > > > My npf.conf contains the below, which fails when rge0 does not (yet) > > have an IP address > > > > $int_if = "rge0" > > $int_ip = inet4($int_if) > > > > So far I have worked around this by having the following in rc.conf > > > > if ifconfig rge0 | grep -q 'inet ' ; then > > npf_rules=/etc/npf.conf > > else > > npf_rules=/etc/npf.boot > > fi > > > > and calling /etc/rc.d/npf reload in dhcpcd.exit-hooks, but this > > seems... inelegant > > > > Pass the `-w' (wait) flag to dhcpcd?: That allows the system to work if a dhcp server responds quickly enough, but leaves a nasty failure mode with broken npf if it does - like in a power failure where anything in set of "dhcp server and all links between" comes up slower than the NetBSD box.... :/ Thanks David