mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
Revert "netlink: Fix IFF_UP flag handling in RTM_NEWLINK's modify_link handler"
This reverts commit 39dbadb7a4.
This broke the
`sys/netlink/test_rtnl_iface.py:TestRtNlIface::test_create_iface_attrs`
testcase.
PR: 288967
Reported by: guest-svmhdvn
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51871
This commit is contained in:
@@ -82,12 +82,9 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
|
||||
}
|
||||
}
|
||||
|
||||
if ((lattrs->ifi_change & IFF_UP) != 0 || lattrs->ifi_change == 0) {
|
||||
/* Request to up or down the interface */
|
||||
if (lattrs->ifi_flags & IFF_UP)
|
||||
if_up(ifp);
|
||||
else
|
||||
if_down(ifp);
|
||||
if ((lattrs->ifi_change & IFF_UP) && (lattrs->ifi_flags & IFF_UP) == 0) {
|
||||
/* Request to down the interface */
|
||||
if_down(ifp);
|
||||
}
|
||||
|
||||
if (lattrs->ifla_mtu > 0) {
|
||||
@@ -100,8 +97,7 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
|
||||
}
|
||||
}
|
||||
|
||||
if ((lattrs->ifi_change & IFF_PROMISC) != 0 ||
|
||||
lattrs->ifi_change == 0) {
|
||||
if (lattrs->ifi_change & IFF_PROMISC) {
|
||||
error = ifpromisc(ifp, lattrs->ifi_flags & IFF_PROMISC);
|
||||
if (error != 0) {
|
||||
nlmsg_report_err_msg(npt, "unable to set promisc");
|
||||
|
||||
Reference in New Issue
Block a user