Skip to content

Commit 5d174dd

Browse files
shemmingerdavem330
authored andcommitted
vxlan: source compatiablity with IFLA_VXLAN_GROUP (v2)
Source compatiability for build iproute2 was broken by: commit c7995c4 Author: Atzm Watanabe <[email protected]> vxlan: Allow setting destination to unicast address. Since this commit has not made it upstream (still net-next), and better to avoid gratitious changes to exported API's; go back to original definition, and add a comment. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 73cf331 commit 5d174dd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/net/vxlan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static void vxlan_setup(struct net_device *dev)
13241324

13251325
static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
13261326
[IFLA_VXLAN_ID] = { .type = NLA_U32 },
1327-
[IFLA_VXLAN_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
1327+
[IFLA_VXLAN_GROUP] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
13281328
[IFLA_VXLAN_LINK] = { .type = NLA_U32 },
13291329
[IFLA_VXLAN_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
13301330
[IFLA_VXLAN_TOS] = { .type = NLA_U8 },
@@ -1406,8 +1406,8 @@ static int vxlan_newlink(struct net *net, struct net_device *dev,
14061406
}
14071407
dst->remote_vni = vni;
14081408

1409-
if (data[IFLA_VXLAN_REMOTE])
1410-
dst->remote_ip = nla_get_be32(data[IFLA_VXLAN_REMOTE]);
1409+
if (data[IFLA_VXLAN_GROUP])
1410+
dst->remote_ip = nla_get_be32(data[IFLA_VXLAN_GROUP]);
14111411

14121412
if (data[IFLA_VXLAN_LOCAL])
14131413
vxlan->saddr = nla_get_be32(data[IFLA_VXLAN_LOCAL]);
@@ -1488,7 +1488,7 @@ static size_t vxlan_get_size(const struct net_device *dev)
14881488
{
14891489

14901490
return nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_ID */
1491-
nla_total_size(sizeof(__be32)) +/* IFLA_VXLAN_REMOTE */
1491+
nla_total_size(sizeof(__be32)) +/* IFLA_VXLAN_GROUP */
14921492
nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LINK */
14931493
nla_total_size(sizeof(__be32))+ /* IFLA_VXLAN_LOCAL */
14941494
nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_TTL */
@@ -1516,7 +1516,7 @@ static int vxlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
15161516
if (nla_put_u32(skb, IFLA_VXLAN_ID, dst->remote_vni))
15171517
goto nla_put_failure;
15181518

1519-
if (dst->remote_ip && nla_put_be32(skb, IFLA_VXLAN_REMOTE, dst->remote_ip))
1519+
if (dst->remote_ip && nla_put_be32(skb, IFLA_VXLAN_GROUP, dst->remote_ip))
15201520
goto nla_put_failure;
15211521

15221522
if (dst->remote_ifindex && nla_put_u32(skb, IFLA_VXLAN_LINK, dst->remote_ifindex))

include/uapi/linux/if_link.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ enum macvlan_mode {
297297
enum {
298298
IFLA_VXLAN_UNSPEC,
299299
IFLA_VXLAN_ID,
300-
IFLA_VXLAN_REMOTE,
300+
IFLA_VXLAN_GROUP, /* group or remote address */
301301
IFLA_VXLAN_LINK,
302302
IFLA_VXLAN_LOCAL,
303303
IFLA_VXLAN_TTL,

0 commit comments

Comments
 (0)