mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
5c5095494f
commit
72a8f97bf2
1 changed files with 1 additions and 1 deletions
|
@ -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) &&
|
||||
|
|
Loading…
Reference in a new issue