From 22aba383ce52f8ca8740f9a74dc66b1b68138813 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Sat, 22 Mar 2008 16:36:20 -0700 Subject: [IPV4]: Always pass ip_options pointer into ip_options_compile. This makes code a bit more uniform and straigthforward. Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller --- net/ipv4/ip_input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net/ipv4/ip_input.c') diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index d36e310b314..e3a0c78fa7b 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -283,13 +283,14 @@ static inline int ip_rcv_options(struct sk_buff *skb) } iph = ip_hdr(skb); + opt = &(IPCB(skb)->opt); + opt->optlen = iph->ihl*4 - sizeof(struct iphdr); - if (ip_options_compile(NULL, skb)) { + if (ip_options_compile(opt, skb)) { IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); goto drop; } - opt = &(IPCB(skb)->opt); if (unlikely(opt->srr)) { struct in_device *in_dev = in_dev_get(dev); if (in_dev) { -- cgit v1.2.3