ipvs: Better derivation of ipvs in ip_vs_tunnel_xmit
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 21 Sep 2015 18:02:44 +0000 (13:02 -0500)
committerSimon Horman <horms@verge.net.au>
Thu, 24 Sep 2015 00:34:41 +0000 (09:34 +0900)
Don't use "net_ipvs(skb_net(skb))" as skb_net is a bad hack.  Instead
use cp->ipvs and ipvs->net for the net.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_xmit.c

index 5b5ec0b688de34b9031cedaea2956f4833842bfe..ec10ebf246fdd801a1b5d9395019242782bcffb9 100644 (file)
@@ -971,8 +971,8 @@ int
 ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
                  struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh)
 {
-       struct net *net = skb_net(skb);
-       struct netns_ipvs *ipvs = net_ipvs(net);
+       struct netns_ipvs *ipvs = cp->ipvs;
+       struct net *net = ipvs->net;
        struct rtable *rt;                      /* Route to the other host */
        __be32 saddr;                           /* Source for tunnel */
        struct net_device *tdev;                /* Device to other host */
This page took 0.027134 seconds and 5 git commands to generate.