Skip to content

Commit

Permalink
ipv6: remove unneeded check to pskb_may_pull in ipip6_rcv
Browse files Browse the repository at this point in the history
This is already checked by the caller (tunnel64_rcv) and brings ipip6_rcv
in line with ipip_rcv.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Frederic Sowa authored and David S. Miller committed Jan 18, 2013
1 parent 115b0aa commit 1ad759d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,15 +592,10 @@ static int ipip6_err(struct sk_buff *skb, u32 info)

static int ipip6_rcv(struct sk_buff *skb)
{
const struct iphdr *iph;
const struct iphdr *iph = ip_hdr(skb);
struct ip_tunnel *tunnel;
int err;

if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
goto out;

iph = ip_hdr(skb);

tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
iph->saddr, iph->daddr);
if (tunnel != NULL) {
Expand Down

0 comments on commit 1ad759d

Please sign in to comment.