ofproto: Report 0 Mbps when speed not available instead of 100 Mbps.
[openvswitch] / ofproto / ofproto-dpif-sflow.c
index d43cb39e7171ef6e557157a0a9741be020f231a2..69362ab84ed8060a208bbf331692e6ecfa08985c 100644 (file)
@@ -179,7 +179,7 @@ sflow_agent_get_counters(void *ds_, SFLPoller *poller,
     if (!netdev_get_features(dsp->ofport->netdev, &current, NULL, NULL, NULL)) {
         /* The values of ifDirection come from MAU MIB (RFC 2668): 0 = unknown,
            1 = full-duplex, 2 = half-duplex, 3 = in, 4=out */
-        counters->ifSpeed = netdev_features_to_bps(current);
+        counters->ifSpeed = netdev_features_to_bps(current, 0);
         counters->ifDirection = (netdev_features_is_full_duplex(current)
                                  ? 1 : 2);
     } else {