diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-06-26 10:48:03 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-07-02 17:55:14 +0200 |
commit | fc99aad3780946bd036fad9a82845f6735f3c719 (patch) | |
tree | 21b7110967e75b45b0f80d1f4c504b00270c2b84 /src/devices/nm-device-ip-tunnel.c | |
parent | 3f9f9f7fa228615967efd6000804f30011f33576 (diff) | |
download | NetworkManager-fc99aad3780946bd036fad9a82845f6735f3c719.tar.gz |
ip-tunnel: allow wired setting for some tunnel modesbg/ip-tunnel-gretap-bgo796645
gretap and ip6gretap ip-tunnel interfaces encapsulate L2 packets over
IP. Allow adding a wired setting for such connections so that users
can change the interface MAC.
Diffstat (limited to 'src/devices/nm-device-ip-tunnel.c')
-rw-r--r-- | src/devices/nm-device-ip-tunnel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c index a497461cc0..35c9b0b6f6 100644 --- a/src/devices/nm-device-ip-tunnel.c +++ b/src/devices/nm-device-ip-tunnel.c @@ -952,6 +952,21 @@ set_property (GObject *object, guint prop_id, } } +static NMActStageReturn +act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason) +{ + NMActStageReturn ret; + + ret = NM_DEVICE_CLASS (nm_device_ip_tunnel_parent_class)->act_stage1_prepare (device, out_failure_reason); + if (ret != NM_ACT_STAGE_RETURN_SUCCESS) + return ret; + + if (!nm_device_hw_addr_set_cloned (device, nm_device_get_applied_connection (device), FALSE)) + return NM_ACT_STAGE_RETURN_FAILURE; + + return NM_ACT_STAGE_RETURN_SUCCESS; +} + /*****************************************************************************/ static void @@ -1028,6 +1043,7 @@ nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *klass) dbus_object_class->interface_infos = NM_DBUS_INTERFACE_INFOS (&interface_info_device_ip_tunnel); + device_class->act_stage1_prepare = act_stage1_prepare; device_class->link_changed = link_changed; device_class->can_reapply_change = can_reapply_change; device_class->complete_connection = complete_connection; |