mirror of
https://github.com/openvswitch/ovs
synced 2025-10-23 14:57:06 +00:00
netdev-vport: Report carrier state of tunnel egress interfaces.
Record carrier state of tunnel egress interface in "tunnel_egress_iface_carrier" key in "status" map of Interface table.
This commit is contained in:
@@ -362,7 +362,16 @@ netdev_vport_get_status(const struct netdev *netdev, struct shash *sh)
|
||||
const char *iface = netdev_vport_get_tnl_iface(netdev);
|
||||
|
||||
if (iface) {
|
||||
struct netdev *egress_netdev;
|
||||
|
||||
shash_add(sh, "tunnel_egress_iface", xstrdup(iface));
|
||||
|
||||
if (!netdev_open_default(iface, &egress_netdev)) {
|
||||
shash_add(sh, "tunnel_egress_iface_carrier",
|
||||
xstrdup(netdev_get_carrier(egress_netdev)
|
||||
? "up" : "down"));
|
||||
netdev_close(egress_netdev);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -1062,6 +1062,12 @@
|
||||
traffic destined for the configured <code>remote_ip</code>.
|
||||
This could be an internal interface such as a bridge port.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>tunnel_egress_iface_carrier</code></dt>
|
||||
<dd>Whether a carrier is detected on <ref
|
||||
column="tunnel_egress_iface"/>. Valid values are <code>down</code>
|
||||
and <code>up</code>.</dd>
|
||||
</dl>
|
||||
</column>
|
||||
</group>
|
||||
|
||||
|
Reference in New Issue
Block a user