Commit bcc45293 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: gre: remove ip6gre_header_parse()

dev_parse_header() callers provide 8 bytes of storage,
so it's not possible to store an IPv6 address.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2bcabec
...@@ -1279,16 +1279,8 @@ static int ip6gre_header(struct sk_buff *skb, struct net_device *dev, ...@@ -1279,16 +1279,8 @@ static int ip6gre_header(struct sk_buff *skb, struct net_device *dev,
return -t->hlen; 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 = { static const struct header_ops ip6gre_header_ops = {
.create = ip6gre_header, .create = ip6gre_header,
.parse = ip6gre_header_parse,
}; };
static const struct net_device_ops ip6gre_netdev_ops = { static const struct net_device_ops ip6gre_netdev_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment