diff options
author | Alex Gartrell <agartrell@fb.com> | 2014-10-06 08:46:19 -0700 |
---|---|---|
committer | Simon Horman <simon.horman@netronome.com> | 2014-10-28 09:48:31 +0900 |
commit | 3d53666b40007b55204ee8890618da79a20c9940 (patch) | |
tree | 224d140b52c1568d3d82c44103c90f8d9747d379 /net | |
parent | 7965ee93719921ea5978f331da653dfa2d7b99f5 (diff) | |
download | linux-3d53666b40007b55204ee8890618da79a20c9940.tar.gz linux-3d53666b40007b55204ee8890618da79a20c9940.tar.bz2 linux-3d53666b40007b55204ee8890618da79a20c9940.zip |
ipvs: Avoid null-pointer deref in debug code
Use daddr instead of reaching into dest.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_xmit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index 91f17c1eb8a2..437a3663ad03 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c @@ -316,7 +316,7 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest, if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode, local))) { IP_VS_DBG_RL("We are crossing local and non-local addresses" - " daddr=%pI4\n", &dest->addr.ip); + " daddr=%pI4\n", &daddr); goto err_put; } @@ -458,7 +458,7 @@ __ip_vs_get_out_rt_v6(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest, if (unlikely(crosses_local_route_boundary(skb_af, skb, rt_mode, local))) { IP_VS_DBG_RL("We are crossing local and non-local addresses" - " daddr=%pI6\n", &dest->addr.in6); + " daddr=%pI6\n", daddr); goto err_put; } |