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>
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;
}
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;
}