When dpif-netdev is in use as a "dummy" datapath, the devices that are
added to it have type "dummy", but the dpif methods that report the types
of ports reported that they had type "system". This meant that every time
the bridge code reconfigured, it would see that the ports had the wrong
types and delete and re-add them, which had other undesirable effects such
as flushing the entire MAC learning table whenever ovs-vsctl changed the
configuration.
Signed-off-by: Ben Pfaff <blp@nicira.com>
struct dpif_port *dpif_port)
{
dpif_port->name = xstrdup(netdev_get_name(port->netdev));
- dpif_port->type = xstrdup(port->internal ? "internal" : "system");
+ dpif_port->type = xstrdup(port->internal ? "internal"
+ : netdev_get_type(port->netdev));
dpif_port->port_no = port->port_no;
}
free(state->name);
state->name = xstrdup(netdev_get_name(port->netdev));
dpif_port->name = state->name;
- dpif_port->type = port->internal ? "internal" : "system";
+ dpif_port->type = (char *) (port->internal ? "internal"
+ : netdev_get_type(port->netdev));
dpif_port->port_no = port->port_no;
state->port_no = port_no + 1;
return 0;