summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2019-07-26 12:16:09 -0700
committerDavid S. Miller <davem@davemloft.net>2019-07-27 14:23:48 -0700
commit280b0b8e89ade4277147e598d5806de12bff5fbc (patch)
tree5773032b595b66592c56369a6e15726d5fc2a66e /net
parentedcde3ee579bcac75ceb47758f18d2b1d26a39f8 (diff)
ipv6: remove printk
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/exthdrs_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
index b358f1a4dd08..da46c4284676 100644
--- a/net/ipv6/exthdrs_core.c
+++ b/net/ipv6/exthdrs_core.c
@@ -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;
}