Insert the newly created iface into bridge ifaces hmap only when ofp_port is not OFPP_NONE.
Reported-by: Dumitru Ceara <[email protected]> Signed-off-by: Ales Musil <[email protected]> --- vswitchd/bridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 1db74de9d..e5ac59465 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2130,8 +2130,10 @@ iface_create(struct bridge *br, const struct ovsrec_interface *iface_cfg, iface->netdev = netdev; iface->type = iface_get_type(iface_cfg, br->cfg); iface->cfg = iface_cfg; - hmap_insert(&br->ifaces, &iface->ofp_port_node, - hash_ofp_port(ofp_port)); + if (iface->ofp_port != OFPP_NONE) { + hmap_insert(&br->ifaces, &iface->ofp_port_node, + hash_ofp_port(ofp_port)); + } /* Populate initial status in database. */ iface_refresh_stats(iface); -- 2.37.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
