[PATCH iproute2] bridge: Assume master at FDB modification

Subsystems: the rest

STALE3330d

3 messages, 2 authors, 2017-07-26 · open the first message on its own page

[PATCH iproute2] bridge: Assume master at FDB modification

From: Arkadi Sharshevsky <hidden>
Date: 2017-07-26 15:33:27

According to the man page the master flag should be the default, yet, the
current code assumes otherwise.

Signed-off-by: Arkadi Sharshevsky <redacted>
---
 bridge/fdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bridge/fdb.c b/bridge/fdb.c
index e5cebf9..7c77157 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -496,9 +496,9 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
 		return -1;
 	}
 
-	/* Assume self */
+	/* Assume master */
 	if (!(req.ndm.ndm_flags&(NTF_SELF|NTF_MASTER)))
-		req.ndm.ndm_flags |= NTF_SELF;
+		req.ndm.ndm_flags |= NTF_MASTER;
 
 	/* Assume permanent */
 	if (!(req.ndm.ndm_state&(NUD_PERMANENT|NUD_REACHABLE)))
-- 
2.4.11

Re: [PATCH iproute2] bridge: Assume master at FDB modification

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-07-26 16:08:23

On Wed, 26 Jul 2017 18:36:34 +0300
Arkadi Sharshevsky [off-list ref] wrote:
According to the man page the master flag should be the default, yet, the
current code assumes otherwise.

Signed-off-by: Arkadi Sharshevsky <redacted>
Agree that the documentation and code don't match.
But your change could break users with existing scripts by changing behavior.

It would be safer to change the man page not the code.

Re: [PATCH iproute2] bridge: Assume master at FDB modification

From: Arkadi Sharshevsky <hidden>
Date: 2017-07-26 16:21:56


On 07/26/2017 07:08 PM, Stephen Hemminger wrote:
On Wed, 26 Jul 2017 18:36:34 +0300
Arkadi Sharshevsky [off-list ref] wrote:
quoted
According to the man page the master flag should be the default, yet, the
current code assumes otherwise.

Signed-off-by: Arkadi Sharshevsky <redacted>
Agree that the documentation and code don't match.
But your change could break users with existing scripts by changing behavior.

It would be safer to change the man page not the code.
Can we maybe set master and self by default. It doesn't make
sense by default to not include the bridge, it will not cause
regression in this case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help