Re: Unit dependency of network-pre.target in nftables.service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Two reasons:

* Those scripts would run after the interface had been fully configured (for example, waiting until an IPv4 address had been delivered by DHCPv4) and there's no reason to delay applying 'netdev' family rules for that; applying them earlier is better.

* Using a udev rule means it doesn't matter which network-management tooling is in use: ifupdown, systemd-networkd, Network Manager, etc.

On Wed, Dec 20, 2023, at 04:40, You Yu Lu wrote:
> Thank you so much for this example. It is very clear and useful.
> I will try this out on my system and see if the inconsistent behavior
> is still there.
>
> Just wondering, what is the reason you decided to use udev rule to
> trigger the service, instead of a script in /etc/network/if-up.d/ or
> /etc/networkd-dispatcher/?
>
>>
>> /etc/udev/rules.d/99-nftables-netdev.rules
>> ----
>> SUBSYSTEM=="net", KERNEL=="enp1s0f0", ACTION=="add", ENV{SYSTEMD_WANTS}+="nftables-netdev@enp1s0f0.service"




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux