• delay npf/npfd service start at boot

    From sehnsucht@21:1/5 to All on Wed Nov 28 19:45:44 2018
    Hi,
    I think npf is enabled over a wireless interface, it doesn't wait for wpa_supplicant to
    establish a working connection, thus failing to apply npf.conf, and
    retunrning:

    /etc/npf.conf#$line#$column: no address matched for interface $if near ')'

    predictably `npfctl show` returns
    # filtering: inactive
    # config: loaded

    npfd fails to start subsequently, returning:

    npfd: pcap_dump_open failed for `/var/log/npflog0.pcap'

    If I use service() to restart npf/npfd manually I get no stderr, everything works, my confing
    is applied as expected and I can tcpdump npflog0.pcap to display logs.

    I tried adding wpa_supplicant, dhcpcd and NETWORKING to the '#
    REQUIRE: ' entry of /etc/rc.d/, but this didn't work the problem out: albeit
    rcorder is
    followed, and npf waits for wpa_supplicant and dhcpcd to start, it still
    actually start before a
    connection is established.

    How can I properly address this problem? (e.g. an idea could be writing a
    sleep script)

    Thanks in advance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sehnsucht@21:1/5 to sehnsucht on Mon Dec 3 16:27:21 2018
    Solved, just had to replace inet4()/inet6() with ifaddrs() when in
    /etc/npf.conf for DHCP; in this way npf waits for wpa_supplicant
    to establish a connection and for dhcpcd to assign a dynamic
    address for the default interface




    sehnsucht@fastmail.com (sehnsucht) Wrote in message:
    Hi,
    I think npf is enabled over a wireless interface, it doesn't wait for wpa_supplicant to
    establish a working connection, thus failing to apply npf.conf, and retunrning:

    /etc/npf.conf#$line#$column: no address matched for interface $if near ')'

    predictably `npfctl show` returns
    # filtering: inactive
    # config: loaded

    npfd fails to start subsequently, returning:

    npfd: pcap_dump_open failed for `/var/log/npflog0.pcap'

    If I use service() to restart npf/npfd manually I get no stderr, everything works, my confing
    is applied as expected and I can tcpdump npflog0.pcap to display logs.

    I tried adding wpa_supplicant, dhcpcd and NETWORKING to the '#
    REQUIRE: ' entry of /etc/rc.d/, but this didn't work the problem out: albeit
    rcorder is
    followed, and npf waits for wpa_supplicant and dhcpcd to start, it still
    actually start before a
    connection is established.

    How can I properly address this problem? (e.g. an idea could be writing a
    sleep script)

    Thanks in advance




    --
    P.V.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)