ipv6: gre: remove ip6gre_header_parse()
authorEric Dumazet <edumazet@google.com>
Wed, 26 Sep 2012 01:39:20 +0000 (01:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2012 22:49:22 +0000 (18:49 -0400)
dev_parse_header() callers provide 8 bytes of storage,
so it's not possible to store an IPv6 address.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c

index 613a1664774184fb3b062d328035e1a3c94c7656..0185679c5f536c1fa98d71ac90a2c24cd6481d8f 100644 (file)
@@ -1279,16 +1279,8 @@ static int ip6gre_header(struct sk_buff *skb, struct net_device *dev,
        return -t->hlen;
 }
 
-static int ip6gre_header_parse(const struct sk_buff *skb, unsigned char *haddr)
-{
-       const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)skb_mac_header(skb);
-       memcpy(haddr, &ipv6h->saddr, sizeof(struct in6_addr));
-       return sizeof(struct in6_addr);
-}
-
 static const struct header_ops ip6gre_header_ops = {
        .create = ip6gre_header,
-       .parse  = ip6gre_header_parse,
 };
 
 static const struct net_device_ops ip6gre_netdev_ops = {