summaryrefslogtreecommitdiffstats
path: root/drivers/net/vrf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-11 14:43:39 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-11 14:43:39 -0500
commit02ac5d1487115d160fab4c3e61b7edc20a945af9 (patch)
tree08a39341379ce6f1ad4f3997df36c76ee82cee9c /drivers/net/vrf.c
parent265592a1dfc31ecab02a960721a1f137e50afb17 (diff)
parentba836a6f5ab1243ff5e08a941a2d1de8b31244e1 (diff)
downloadlinux-02ac5d1487115d160fab4c3e61b7edc20a945af9.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r--drivers/net/vrf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 895e3e258543..264fc1585b3c 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -262,7 +262,9 @@ static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
.flowi4_iif = LOOPBACK_IFINDEX,
.flowi4_tos = RT_TOS(ip4h->tos),
.flowi4_flags = FLOWI_FLAG_ANYSRC | FLOWI_FLAG_SKIP_NH_OIF,
+ .flowi4_proto = ip4h->protocol,
.daddr = ip4h->daddr,
+ .saddr = ip4h->saddr,
};
struct net *net = dev_net(vrf_dev);
struct rtable *rt;
@@ -1249,6 +1251,8 @@ static int vrf_newlink(struct net *src_net, struct net_device *dev,
return -EINVAL;
vrf->tb_id = nla_get_u32(data[IFLA_VRF_TABLE]);
+ if (vrf->tb_id == RT_TABLE_UNSPEC)
+ return -EINVAL;
dev->priv_flags |= IFF_L3MDEV_MASTER;