mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
ip-tunnel: set ip6gretap MAC address when creating the link
This commit is contained in:
parent
0494a84878
commit
fa4fbd3333
|
@ -843,7 +843,10 @@ create_and_realize (NMDevice *device,
|
|||
lnk_ip6tnl.is_tap = (mode == NM_IP_TUNNEL_MODE_IP6GRETAP);
|
||||
|
||||
r = nm_platform_link_ip6gre_add (nm_device_get_platform (device),
|
||||
iface, &lnk_ip6tnl, out_plink);
|
||||
iface,
|
||||
mac_address_valid ? mac_address : NULL,
|
||||
mac_address_valid ? ETH_ALEN : 0,
|
||||
&lnk_ip6tnl, out_plink);
|
||||
} else {
|
||||
lnk_ip6tnl.proto = nm_setting_ip_tunnel_get_mode (s_ip_tunnel) == NM_IP_TUNNEL_MODE_IPIP6
|
||||
? IPPROTO_IPIP
|
||||
|
|
|
@ -1511,13 +1511,15 @@ nm_platform_link_ip6tnl_add (NMPlatform *self,
|
|||
static inline int
|
||||
nm_platform_link_ip6gre_add (NMPlatform *self,
|
||||
const char *name,
|
||||
const void *address,
|
||||
size_t address_len,
|
||||
const NMPlatformLnkIp6Tnl *props,
|
||||
const NMPlatformLink **out_link)
|
||||
{
|
||||
g_return_val_if_fail (props, -NME_BUG);
|
||||
g_return_val_if_fail (props->is_gre, -NME_BUG);
|
||||
|
||||
return nm_platform_link_add (self, props->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE, name, 0, NULL, 0, props, out_link);
|
||||
return nm_platform_link_add (self, props->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE, name, 0, address, address_len, props, out_link);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
|
@ -1380,7 +1380,7 @@ nmtstp_link_ip6gre_add (NMPlatform *platform,
|
|||
100);
|
||||
}
|
||||
} else
|
||||
success = NMTST_NM_ERR_SUCCESS (nm_platform_link_ip6gre_add (platform, name, lnk, &pllink));
|
||||
success = NMTST_NM_ERR_SUCCESS (nm_platform_link_ip6gre_add (platform, name, NULL, 0, lnk, &pllink));
|
||||
|
||||
_assert_pllink (platform, success, pllink, name, lnk->is_tap ? NM_LINK_TYPE_IP6GRETAP : NM_LINK_TYPE_IP6GRE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue