aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2015-10-16 19:36:00 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-19 01:44:10 -0400
commite277de5f3f7d6eed2a41920983c44c4df386b871 (patch)
treed6a592076b5ec65c773c2234d31260e1620405b8 /drivers/net/vxlan.c
parent740dbc289155fdeed32438396370e70b684cd45e (diff)
tunnels: Don't require remote endpoint or ID during creation.
Before lightweight tunnels existed, it really didn't make sense to create a tunnel that was not fully specified, such as without a destination IP address - the resulting packets would go nowhere. However, with lightweight tunnels, the opposite is true - it doesn't make sense to require this information when it will be provided later on by the route. This loosens the requirements for this information. An alternative would be to allow the relaxed version only when COLLECT_METADATA is enabled. However, since there are several variations on this theme (such as NBMA tunnels in GRE), just dropping the restrictions seems the most consistent across tunnels and with the existing configuration. CC: John Linville <linville@tuxdriver.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index bbac1d35ed4e..afdc65fd5bc5 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2745,11 +2745,10 @@ static int vxlan_newlink(struct net *src_net, struct net_device *dev,
2745 struct vxlan_config conf; 2745 struct vxlan_config conf;
2746 int err; 2746 int err;
2747 2747
2748 if (!data[IFLA_VXLAN_ID])
2749 return -EINVAL;
2750
2751 memset(&conf, 0, sizeof(conf)); 2748 memset(&conf, 0, sizeof(conf));
2752 conf.vni = nla_get_u32(data[IFLA_VXLAN_ID]); 2749
2750 if (data[IFLA_VXLAN_ID])
2751 conf.vni = nla_get_u32(data[IFLA_VXLAN_ID]);
2753 2752
2754 if (data[IFLA_VXLAN_GROUP]) { 2753 if (data[IFLA_VXLAN_GROUP]) {
2755 conf.remote_ip.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_GROUP]); 2754 conf.remote_ip.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_GROUP]);