summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-01-22 18:47:32 +0100
committerThomas Haller <thaller@redhat.com>2015-01-22 18:56:37 +0100
commit8dce71be74a1c91ca96294c8b6a22bce6b38493e (patch)
tree9395c4367a07e52a475cc4bf6f226e4bf98cd63c
parent7d2e43a455c2ffa5a68c98cc01265231c529a130 (diff)
downloadNetworkManager-8dce71be74a1c91ca96294c8b6a22bce6b38493e.tar.gz
device: adjust default route metric for BRIDGE device type
We forgot to include the BRIDGE, so that bridge devices got a default priority (route-metric) of 950 Add it between VLAN and MODEM type. Also return a different metric for UNKNOWN device types, but these priorities are not actually expected.
-rw-r--r--src/devices/nm-device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index f11266556d..607ff3785f 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -693,6 +693,8 @@ nm_device_get_priority (NMDevice *self)
return 350;
case NM_DEVICE_TYPE_VLAN:
return 400;
+ case NM_DEVICE_TYPE_BRIDGE:
+ return 425;
case NM_DEVICE_TYPE_MODEM:
return 450;
case NM_DEVICE_TYPE_BT:
@@ -701,9 +703,16 @@ nm_device_get_priority (NMDevice *self)
return 600;
case NM_DEVICE_TYPE_OLPC_MESH:
return 650;
- default:
+ case NM_DEVICE_TYPE_GENERIC:
return 950;
+ case NM_DEVICE_TYPE_UNKNOWN:
+ return 10000;
+ case NM_DEVICE_TYPE_UNUSED1:
+ case NM_DEVICE_TYPE_UNUSED2:
+ /* omit default: to get compiler warning about missing switch cases */
+ break;
}
+ return 11000;
}
guint32