summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-13 03:03:46 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-05-13 03:03:46 (GMT)
commit72a8f97bf2dfe1b0f02ba8dbaed7d6b76657aae3 (patch)
tree9f736a6ab5b61bb0fc053c4284282c2b19318529 /net
parent5c5095494fb545f53b80cbb7539679a10a3472a6 (diff)
downloadlinux-fsl-qoriq-72a8f97bf2dfe1b0f02ba8dbaed7d6b76657aae3.tar.xz
ipv4: Fix 'iph' use before set.
I swear none of my compilers warned about this, yet it is so obvious. > net/ipv4/ip_forward.c: In function 'ip_forward': > net/ipv4/ip_forward.c:87: warning: 'iph' may be used uninitialized in this function Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_forward.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index fcbc0c8..3b34d1c 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -84,7 +84,7 @@ int ip_forward(struct sk_buff *skb)
rt = skb_rtable(skb);
- if (opt->is_strictroute && iph->daddr != rt->rt_gateway)
+ if (opt->is_strictroute && ip_hdr(skb)->daddr != rt->rt_gateway)
goto sr_failed;
if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&