Skip to content

Commit f3d9bd9

Browse files
authored
Merge pull request #18413 from Shbinging/fix_babel_wired
babled: reset wired/wireless internal only when wired/wireless status changed
2 parents 4b6e0ba + 6af2af8 commit f3d9bd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: babeld/babel_interface.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ DEFPY (babel_set_wired,
310310
babel_ifp = babel_get_if_nfo(ifp);
311311

312312
assert (babel_ifp != NULL);
313-
babel_set_wired_internal(babel_ifp, no ? 0 : 1);
313+
if ((CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? 1 : 0) != (no ? 0 : 1))
314+
babel_set_wired_internal(babel_ifp, no ? 0 : 1);
314315
return CMD_SUCCESS;
315316
}
316317

@@ -328,7 +329,8 @@ DEFPY (babel_set_wireless,
328329
babel_ifp = babel_get_if_nfo(ifp);
329330

330331
assert (babel_ifp != NULL);
331-
babel_set_wired_internal(babel_ifp, no ? 1 : 0);
332+
if ((CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? 1 : 0) != (no ? 1 : 0))
333+
babel_set_wired_internal(babel_ifp, no ? 1 : 0);
332334
return CMD_SUCCESS;
333335
}
334336

0 commit comments

Comments
 (0)