The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.19
------>
commit c935ea6ca0d4d0aeed3857bff8d507f2f2a63176
Author: Vladimir Davydov <[email protected]>
Date: Fri Jun 24 14:30:30 2016 +0400
ve/net: ipip: fix crash on newlink if VE_FEATURE_IPIP is disabled
In this case net_generic returns NULL. We must handle this gracefully.
Signed-off-by: Vladimir Davydov <[email protected]>
Tested-by: Evgenii Shatokhin <[email protected]>
---
net/ipv4/ipip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 7842dcb..b1004fb 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -357,6 +357,9 @@ static int ipip_newlink(struct net *src_net, struct
net_device *dev,
{
struct ip_tunnel_parm p;
+ if (net_generic(dev_net(dev), ipip_net_id) == NULL)
+ return -EACCES;
+
ipip_netlink_parms(data, &p);
return ip_tunnel_newlink(dev, tb, &p);
}
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel