mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
babled: set wired/wireless internal only when wired/wireless status changes
As stated in doc, interface's attributes such noninterfering/interfering are reset when the wired/wireless status of an interface is changed. If wired/wireless status is not changed, such as wired->wired, we should not reset internal attributes. Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
This commit is contained in:
parent
c288e5fbaf
commit
6af2af83be
|
@ -310,7 +310,8 @@ DEFPY (babel_set_wired,
|
|||
babel_ifp = babel_get_if_nfo(ifp);
|
||||
|
||||
assert (babel_ifp != NULL);
|
||||
babel_set_wired_internal(babel_ifp, no ? 0 : 1);
|
||||
if ((CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? 1 : 0) != (no ? 0 : 1))
|
||||
babel_set_wired_internal(babel_ifp, no ? 0 : 1);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -328,7 +329,8 @@ DEFPY (babel_set_wireless,
|
|||
babel_ifp = babel_get_if_nfo(ifp);
|
||||
|
||||
assert (babel_ifp != NULL);
|
||||
babel_set_wired_internal(babel_ifp, no ? 1 : 0);
|
||||
if ((CHECK_FLAG(babel_ifp->flags, BABEL_IF_WIRED) ? 1 : 0) != (no ? 1 : 0))
|
||||
babel_set_wired_internal(babel_ifp, no ? 1 : 0);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue