> Date: Wed, 28 Jul 2021 19:26:53 +0200
> From: Paul de Weerd <[email protected]>
> 
> Hi all,
> 
> I just upgraded my home gateway to the latest snapshot and had a few
> issues due to dhcpleased not configuring a lease before things
> progressed.  This is due to my v6 setup: I have tunneled IPv6 from
> elsewhere that I statically configure over a wg(4) tunnel.  Of course,
> that sets a default route (for v6) over the tunnel interface, so a
> default route is present at boot.  Because of that, the sleep that was
> recently added to /etc/rc doesn't trigger, so when pf loads it fails
> because my rules reference a non-existing address:
> 
> no IP address found for vlan34:0
> /etc/pf.conf:56: could not parse host specification
> pfctl: Syntax error in config file: pf rules not loaded
> 
> (vlan34 is the autoconf interface)
> 
> Realizing this is a fringe case, I thought I should probably just
> solve this locally with a more specific sleep (waiting for a v4
> address on my upstream interface).  What is the recommended place to
> add this sleep routing?  /etc/hostname.vlan34 seems obvious, but
> perhaps there's a better place for it?
> 
> Thanks,
> 
> Paul
> 
> -- 
> >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
> +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
>                  http://www.weirdnet.nl/                 
> 

Sleeping isn't needed if the address in pf.conf(5) is parenthesized:

        pass out to (vlan34:0)

Source: https://www.openbsd.org/faq/pf/filter.html#syntax

        The name of a network interface or group in parentheses ( ).
        This tells PF to update the rule if the IP address(es) on the
        named interface change. This is useful on an interface that
        gets its IP address via DHCP or dial-up as the ruleset doesn't
        have to be reloaded each time the address changes.

Reply via email to