diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-03-15 17:44:49 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-03-16 10:43:46 +0100 |
commit | aa9b5e28eb6d85262c785b0ccd9c1d98c222089c (patch) | |
tree | 3f965af4a684d07bd906d67f9212f144f69a6e64 | |
parent | 7b2bea7ceb2cb95cf6f45b7d17abc552490c68a5 (diff) | |
download | NetworkManager-aa9b5e28eb6d85262c785b0ccd9c1d98c222089c.tar.gz |
ethernet: fix setting ip-ifindex for PPPoE connections
When a NMDevice is involved in a PPPoE activation, it means that the
connection has connection.interface-name=<ethernet-interface>. In such
case, the ppp ifindex should be set as ip-ifindex of the ethernet
device.
Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
-rw-r--r-- | src/core/devices/nm-device-ethernet.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/devices/nm-device-ethernet.c b/src/core/devices/nm-device-ethernet.c index 7cddf9d838..4b6adfc13d 100644 --- a/src/core/devices/nm-device-ethernet.c +++ b/src/core/devices/nm-device-ethernet.c @@ -1163,11 +1163,10 @@ _ppp_mgr_callback(NMPppMgr *ppp_mgr, const NMPppMgrCallbackData *callback_data, gs_free char *old_name = NULL; gs_free_error GError *error = NULL; - if (!nm_device_take_over_link(device, callback_data->data.ifindex, &old_name, &error)) { + if (!nm_device_set_ip_ifindex(device, callback_data->data.ifindex)) { _LOGW(LOGD_DEVICE | LOGD_PPP, - "could not take control of link %d: %s", - callback_data->data.ifindex, - error->message); + "could not set ip-ifindex %d", + callback_data->data.ifindex); _ppp_mgr_cleanup(self); nm_device_state_changed(device, NM_DEVICE_STATE_FAILED, |