diff options
author | Thomas Haller <thaller@redhat.com> | 2018-09-11 21:54:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-09-11 21:55:11 +0200 |
commit | 4a4439835dde96fc81f9e09889d8f82436b0331a (patch) | |
tree | 46b801000527b2ff0e5f9c951a0ed528a74ae1f8 | |
parent | 4d11eba8c59b6dc00a0cc4b644104b19873699c9 (diff) | |
download | NetworkManager-4a4439835dde96fc81f9e09889d8f82436b0331a.tar.gz |
ppp: downgrade warning about repeated SetIfindex calls from ppp plugin
In src/ppp/nm-pppd-plugin.c, it seems that pppd can invoke
phasechange(PHASE_RUNNING:) multiple times. Hence, the plugin
calls SetIfindex multiple times too. In nm-ppp-manager.c, we
want to make sure that the ifindex does not change after it
was set once. However, calling SetIfindex with the same ifindex
is not something worth warning. Just log a debug message and nothing.
Maybe the plugin should remember that it already set the ifindex,
and avoid multiple D-Bus calls. But it's unclear that that is desired.
For now, just downgrade the warning.
-rw-r--r-- | src/ppp/nm-ppp-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c index fe2adf578e..e168613947 100644 --- a/src/ppp/nm-ppp-manager.c +++ b/src/ppp/nm-ppp-manager.c @@ -441,7 +441,10 @@ impl_ppp_manager_set_ifindex (NMDBusObject *obj, _LOGD ("set-ifindex %d", (int) ifindex); if (priv->ifindex >= 0) { - _LOGW ("can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); + if (priv->ifindex == ifindex) + _LOGD ("ignore repeated calls setting ifindex to %d", (int) ifindex); + else + _LOGW ("can't change the ifindex from %d to %d", priv->ifindex, (int) ifindex); goto out; } |