This option sets the NLM_F_REPLACE instead of the NLM_F_EXCL flag, allowing "create or update" patterns.
My current usecase is for managing neighbors, for which I have a control plane, but it can happen that the neighbor is learnt from the dataplane first, and controlplane second. In this case, I want to set the neighbor as NOARP to prevent it from expiring. The easiest is to allow the kernel to just replace the neighbor with the one provided rather than create-fail-delete-create.
This option sets the
NLM_F_REPLACE
instead of theNLM_F_EXCL
flag, allowing "create or update" patterns.My current usecase is for managing neighbors, for which I have a control plane, but it can happen that the neighbor is learnt from the dataplane first, and controlplane second. In this case, I want to set the neighbor as
NOARP
to prevent it from expiring. The easiest is to allow the kernel to just replace the neighbor with the one provided rather than create-fail-delete-create.