diff options
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index ce704df7681b..cf262ccf5047 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -2794,11 +2794,10 @@ static int vxlan_newlink(struct net *src_net, struct net_device *dev, | |||
2794 | struct vxlan_config conf; | 2794 | struct vxlan_config conf; |
2795 | int err; | 2795 | int err; |
2796 | 2796 | ||
2797 | if (!data[IFLA_VXLAN_ID]) | ||
2798 | return -EINVAL; | ||
2799 | |||
2800 | memset(&conf, 0, sizeof(conf)); | 2797 | memset(&conf, 0, sizeof(conf)); |
2801 | conf.vni = nla_get_u32(data[IFLA_VXLAN_ID]); | 2798 | |
2799 | if (data[IFLA_VXLAN_ID]) | ||
2800 | conf.vni = nla_get_u32(data[IFLA_VXLAN_ID]); | ||
2802 | 2801 | ||
2803 | if (data[IFLA_VXLAN_GROUP]) { | 2802 | if (data[IFLA_VXLAN_GROUP]) { |
2804 | conf.remote_ip.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_GROUP]); | 2803 | conf.remote_ip.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_GROUP]); |