|
|
386167 |
From b5433097e288b9733c432005b2cf619b6457afce Mon Sep 17 00:00:00 2001
|
|
|
386167 |
From: Thomas Haller <thaller@redhat.com>
|
|
|
386167 |
Date: Thu, 22 Jan 2015 18:47:32 +0100
|
|
|
386167 |
Subject: [PATCH] device: adjust default route metric for BRIDGE device type
|
|
|
386167 |
|
|
|
386167 |
We forgot to include the BRIDGE, so that bridge
|
|
|
386167 |
devices got a default priority (route-metric) of 950
|
|
|
386167 |
Add it between VLAN and MODEM type.
|
|
|
386167 |
|
|
|
386167 |
Also return a different metric for UNKNOWN
|
|
|
386167 |
device types, but these priorities are not
|
|
|
386167 |
actually expected.
|
|
|
386167 |
|
|
|
386167 |
(cherry picked from commit 8dce71be74a1c91ca96294c8b6a22bce6b38493e)
|
|
|
386167 |
---
|
|
|
386167 |
src/devices/nm-device.c | 11 ++++++++++-
|
|
|
386167 |
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
386167 |
|
|
|
386167 |
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
|
|
386167 |
index 119d4a8..1c75790 100644
|
|
|
386167 |
--- a/src/devices/nm-device.c
|
|
|
386167 |
+++ b/src/devices/nm-device.c
|
|
|
386167 |
@@ -692,6 +692,8 @@ nm_device_get_priority (NMDevice *self)
|
|
|
386167 |
return 350;
|
|
|
386167 |
case NM_DEVICE_TYPE_VLAN:
|
|
|
386167 |
return 400;
|
|
|
386167 |
+ case NM_DEVICE_TYPE_BRIDGE:
|
|
|
386167 |
+ return 425;
|
|
|
386167 |
case NM_DEVICE_TYPE_MODEM:
|
|
|
386167 |
return 450;
|
|
|
386167 |
case NM_DEVICE_TYPE_BT:
|
|
|
386167 |
@@ -700,9 +702,16 @@ nm_device_get_priority (NMDevice *self)
|
|
|
386167 |
return 600;
|
|
|
386167 |
case NM_DEVICE_TYPE_OLPC_MESH:
|
|
|
386167 |
return 650;
|
|
|
386167 |
- default:
|
|
|
386167 |
+ case NM_DEVICE_TYPE_GENERIC:
|
|
|
386167 |
return 950;
|
|
|
386167 |
+ case NM_DEVICE_TYPE_UNKNOWN:
|
|
|
386167 |
+ return 10000;
|
|
|
386167 |
+ case NM_DEVICE_TYPE_UNUSED1:
|
|
|
386167 |
+ case NM_DEVICE_TYPE_UNUSED2:
|
|
|
386167 |
+ /* omit default: to get compiler warning about missing switch cases */
|
|
|
386167 |
+ break;
|
|
|
386167 |
}
|
|
|
386167 |
+ return 11000;
|
|
|
386167 |
}
|
|
|
386167 |
|
|
|
386167 |
guint32
|
|
|
386167 |
--
|
|
|
386167 |
1.9.3
|
|
|
386167 |
|