mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-19 03:20:32 +01:00
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.
(cherry picked from commit 8dce71be74)
This commit is contained in:
parent
95ac7673a8
commit
b5433097e2
1 changed files with 10 additions and 1 deletions
|
|
@ -692,6 +692,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:
|
||||
|
|
@ -700,9 +702,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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue