Thread (7 messages) 7 messages, 3 authors, 2013-06-03

Re: [PATCH net] rtnetlink: ndo_dflt_fdb_del() never works

From: David Miller <davem@davemloft.net>
Date: 2013-05-31 08:46:08

From: Alan Robertson <redacted>
Date: Thu, 30 May 2013 16:01:55 -0600
ndo_dflt_fdb_del is checking for a condition which is opposite that
which ndo_dflt_fdb_add enforces.  ndo_dflt_fdb_add declares an error
if (ndm->ndm_state && !(ndm->ndm_state) & NUD_PERMANENT)) - that is, if the
entry is static.  This is consistent with the failure error message.

On the other hand, ndo_dflt_del() declares an error
if (ndm_state & NUD_PERMANENT) - which is inconsistent with the add
precondition, and inconsistent with its failure message text.
As it is now, you can't delete any entry which add allows to be added -
so entry deletion always fails.

Signed-off-by: Alan Robertson <redacted>
What about the ->ndm_state part of the add() test?  Why not include
that in the del() check?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help