On Wed, Jun 05, 2019 at 10:47:58AM +0900, Lorenzo Colitti wrote:
> On Wed, Jun 5, 2019 at 10:43 AM Hangbin Liu <liuhang...@gmail.com> wrote:
> > Although I'm still not clear what's the difference between
> >
> > a) adding a dup rule and remove it later
> > and
> > b) return 0 directly if the rule exactally the same.
> 
> The Android code updates ip rules by adding the new rule and then
> deleting the old rule. Before this patch, the result of the operation
> is that the old rule is deleted and the new rule exists. After this
> patch, if the new rule is the same as the old rule, then the add does
> nothing and the delete deletes the old rule. The result of the
> operation is that the old rule is deleted and the new rule is no
> longer there, and the rules are broken.

Hi Lorenzo,

How do you add the rules? with ip cmd it should has NLM_F_EXCL flag and
you will get -EEXIST error out.

Thanks
Hangbin

Reply via email to