diff options
author | Eric Dumazet <edumazet@google.com> | 2012-09-25 21:39:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-27 18:49:22 -0400 |
commit | bcc452935da124f26885e969ec5a78a8735d1452 (patch) | |
tree | 74fca7942a4679f13036c21036f3ac10154932dc /net/ipv6 | |
parent | e2bcabec6ea5ba30dd2097dc1566e9957d14117c (diff) |
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: Eric Dumazet <edumazet@google.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_gre.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 613a16647741..0185679c5f53 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
@@ -1279,16 +1279,8 @@ static int ip6gre_header(struct sk_buff *skb, struct net_device *dev, | |||
1279 | return -t->hlen; | 1279 | return -t->hlen; |
1280 | } | 1280 | } |
1281 | 1281 | ||
1282 | static int ip6gre_header_parse(const struct sk_buff *skb, unsigned char *haddr) | ||
1283 | { | ||
1284 | const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)skb_mac_header(skb); | ||
1285 | memcpy(haddr, &ipv6h->saddr, sizeof(struct in6_addr)); | ||
1286 | return sizeof(struct in6_addr); | ||
1287 | } | ||
1288 | |||
1289 | static const struct header_ops ip6gre_header_ops = { | 1282 | static const struct header_ops ip6gre_header_ops = { |
1290 | .create = ip6gre_header, | 1283 | .create = ip6gre_header, |
1291 | .parse = ip6gre_header_parse, | ||
1292 | }; | 1284 | }; |
1293 | 1285 | ||
1294 | static const struct net_device_ops ip6gre_netdev_ops = { | 1286 | static const struct net_device_ops ip6gre_netdev_ops = { |