summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorkp <kp@FreeBSD.org>2015-07-01 21:21:14 +0000
committerkp <kp@FreeBSD.org>2015-07-01 21:21:14 +0000
commitf1fbe0ce5b7e8c86d845fa9ac8d872fe69a92b28 (patch)
tree178c1feb7e63e73dbf6ce8d034c211ad111f02f5 /usr.bin
parentb3962232547830a914bb0eb30f16da744b17ad73 (diff)
downloadFreeBSD-src-f1fbe0ce5b7e8c86d845fa9ac8d872fe69a92b28.zip
FreeBSD-src-f1fbe0ce5b7e8c86d845fa9ac8d872fe69a92b28.tar.gz
MFC r284348: Fix panic when adding vtnet interfaces to a bridge
vtnet interfaces are always in promiscuous mode (at least if the VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This confused the bridge code. Instead we now accept all enable/disable promiscuous commands (and always keep IFF_PROMISC set). There are also two issues with the if_bridge error handling. If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to disable promiscuous mode on the interface. That runs into an assert, because promiscuous mode was never set in the first place. (That's the panic reported in PR 200210.) We can only unset promiscuous mode if the interface actually is promiscuous. This goes against the reference counting done by if_promisc(), but only the first/last if_promic() calls can actually fail, so this is safe. A second issue is a double free of bif. It's already freed by bridge_delete_member(). PR: 200210
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud