aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-04-27 07:31:55 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-29 11:53:12 -0400
commit5d174dd80ce94b7ed0950e31fc9a0122c689523b (patch)
tree2443bbececf273f52bf0f9e5ba96794596fdfe70 /drivers/net/vxlan.c
parent73cf3317065a6bc1536b4fb6f51bff4d3138f8ac (diff)
vxlan: source compatiablity with IFLA_VXLAN_GROUP (v2)
Source compatiability for build iproute2 was broken by: commit c7995c43facc6e5dea4de63fa9d283a337aabeb1 Author: Atzm Watanabe <atzm@stratosphere.co.jp> 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 <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index e6ac16cd9ba2..d8de8a1303eb 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1324,7 +1324,7 @@ static void vxlan_setup(struct net_device *dev)
1324 1324
1325static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = { 1325static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
1326 [IFLA_VXLAN_ID] = { .type = NLA_U32 }, 1326 [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) },
1328 [IFLA_VXLAN_LINK] = { .type = NLA_U32 }, 1328 [IFLA_VXLAN_LINK] = { .type = NLA_U32 },
1329 [IFLA_VXLAN_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) }, 1329 [IFLA_VXLAN_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
1330 [IFLA_VXLAN_TOS] = { .type = NLA_U8 }, 1330 [IFLA_VXLAN_TOS] = { .type = NLA_U8 },
@@ -1406,8 +1406,8 @@ static int vxlan_newlink(struct net *net, struct net_device *dev,
1406 } 1406 }
1407 dst->remote_vni = vni; 1407 dst->remote_vni = vni;
1408 1408
1409 if (data[IFLA_VXLAN_REMOTE]) 1409 if (data[IFLA_VXLAN_GROUP])
1410 dst->remote_ip = nla_get_be32(data[IFLA_VXLAN_REMOTE]); 1410 dst->remote_ip = nla_get_be32(data[IFLA_VXLAN_GROUP]);
1411 1411
1412 if (data[IFLA_VXLAN_LOCAL]) 1412 if (data[IFLA_VXLAN_LOCAL])
1413 vxlan->saddr = nla_get_be32(data[IFLA_VXLAN_LOCAL]); 1413 vxlan->saddr = nla_get_be32(data[IFLA_VXLAN_LOCAL]);
@@ -1488,7 +1488,7 @@ static size_t vxlan_get_size(const struct net_device *dev)
1488{ 1488{
1489 1489
1490 return nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_ID */ 1490 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 */
1492 nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LINK */ 1492 nla_total_size(sizeof(__u32)) + /* IFLA_VXLAN_LINK */
1493 nla_total_size(sizeof(__be32))+ /* IFLA_VXLAN_LOCAL */ 1493 nla_total_size(sizeof(__be32))+ /* IFLA_VXLAN_LOCAL */
1494 nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_TTL */ 1494 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)
1516 if (nla_put_u32(skb, IFLA_VXLAN_ID, dst->remote_vni)) 1516 if (nla_put_u32(skb, IFLA_VXLAN_ID, dst->remote_vni))
1517 goto nla_put_failure; 1517 goto nla_put_failure;
1518 1518
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))
1520 goto nla_put_failure; 1520 goto nla_put_failure;
1521 1521
1522 if (dst->remote_ifindex && nla_put_u32(skb, IFLA_VXLAN_LINK, dst->remote_ifindex)) 1522 if (dst->remote_ifindex && nla_put_u32(skb, IFLA_VXLAN_LINK, dst->remote_ifindex))