mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-22 17:20:09 +01:00
ip-tunnel: let update_properties_from_ifindex() clear properties on failure
This commit is contained in:
parent
8bbc6899b9
commit
2b51ecc9e5
1 changed files with 5 additions and 4 deletions
|
|
@ -128,6 +128,7 @@ update_properties_from_ifindex (NMDevice *device, int ifindex)
|
|||
char *key;
|
||||
|
||||
if (ifindex <= 0) {
|
||||
clear:
|
||||
if (priv->parent || priv->parent_ifindex) {
|
||||
g_clear_object (&priv->parent);
|
||||
priv->parent_ifindex = 0;
|
||||
|
|
@ -159,7 +160,7 @@ update_properties_from_ifindex (NMDevice *device, int ifindex)
|
|||
lnk = nm_platform_link_get_lnk_gre (NM_PLATFORM_GET, ifindex, NULL);
|
||||
if (!lnk) {
|
||||
_LOGW (LOGD_HW, "could not read %s properties", "gre");
|
||||
return;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
parent_ifindex = lnk->parent_ifindex;
|
||||
|
|
@ -204,7 +205,7 @@ update_properties_from_ifindex (NMDevice *device, int ifindex)
|
|||
lnk = nm_platform_link_get_lnk_sit (NM_PLATFORM_GET, ifindex, NULL);
|
||||
if (!lnk) {
|
||||
_LOGW (LOGD_HW, "could not read %s properties", "sit");
|
||||
return;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
parent_ifindex = lnk->parent_ifindex;
|
||||
|
|
@ -219,7 +220,7 @@ update_properties_from_ifindex (NMDevice *device, int ifindex)
|
|||
lnk = nm_platform_link_get_lnk_ipip (NM_PLATFORM_GET, ifindex, NULL);
|
||||
if (!lnk) {
|
||||
_LOGW (LOGD_HW, "could not read %s properties", "ipip");
|
||||
return;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
parent_ifindex = lnk->parent_ifindex;
|
||||
|
|
@ -235,7 +236,7 @@ update_properties_from_ifindex (NMDevice *device, int ifindex)
|
|||
lnk = nm_platform_link_get_lnk_ip6tnl (NM_PLATFORM_GET, ifindex, NULL);
|
||||
if (!lnk) {
|
||||
_LOGW (LOGD_HW, "could not read %s properties", "ip6tnl");
|
||||
return;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
parent_ifindex = lnk->parent_ifindex;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue