Skip to content

Commit

Permalink
ipv6: remove printk
Browse files Browse the repository at this point in the history
ipv6_find_hdr() prints a non-rate limited error message
when it cannot find an ipv6 header at a specific offset.
This could be used as a DoS, so just remove it.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jonathan Lemon authored and David S. Miller committed Jul 27, 2019
1 parent edcde3e commit 280b0b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ipv6/exthdrs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
struct ipv6hdr _ip6, *ip6;

ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6);
if (!ip6 || (ip6->version != 6)) {
printk(KERN_ERR "IPv6 header not found\n");
if (!ip6 || (ip6->version != 6))
return -EBADMSG;
}
start = *offset + sizeof(struct ipv6hdr);
nexthdr = ip6->nexthdr;
}
Expand Down

0 comments on commit 280b0b8

Please sign in to comment.