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,11 +82,8 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lattrs->ifi_change & IFF_UP) != 0 || lattrs->ifi_change == 0) {
|
if ((lattrs->ifi_change & IFF_UP) && (lattrs->ifi_flags & IFF_UP) == 0) {
|
||||||
/* Request to up or down the interface */
|
/* Request to down the interface */
|
||||||
if (lattrs->ifi_flags & IFF_UP)
|
|
||||||
if_up(ifp);
|
|
||||||
else
|
|
||||||
if_down(ifp);
|
if_down(ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,8 +97,7 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lattrs->ifi_change & IFF_PROMISC) != 0 ||
|
if (lattrs->ifi_change & IFF_PROMISC) {
|
||||||
lattrs->ifi_change == 0) {
|
|
||||||
error = ifpromisc(ifp, lattrs->ifi_flags & IFF_PROMISC);
|
error = ifpromisc(ifp, lattrs->ifi_flags & IFF_PROMISC);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
nlmsg_report_err_msg(npt, "unable to set promisc");
|
nlmsg_report_err_msg(npt, "unable to set promisc");
|
||||||
|
|||||||
Reference in New Issue
Block a user