diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-09-06 10:02:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-13 19:08:28 -0400 |
commit | 711b8c96842e7e93b01caad6403488498d5cecfa (patch) | |
tree | a0aec69b999bf930de5abd48bd88e13822a2b6f0 | |
parent | a4ae4c6176a7c878018adf470a47c1fae9090978 (diff) |
ipv6/exthdrs: accept tlv which includes only padding
[ Upstream commit 8112b1fe071be01a28a774ed55909e6f4b29712d ]
In rfc4942 and rfc2460 I cannot find anything which would implicate to
drop packets which have only padding in tlv.
Current behaviour breaks TAHI Test v6LC.1.2.6.
Problem was intruduced in:
9b905fe6843 "ipv6/exthdrs: strict Pad1 and PadN check"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ipv6/exthdrs.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 07a7d65a7cb6..8d67900aa003 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -162,12 +162,6 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs, struct sk_buff *skb) | |||
162 | off += optlen; | 162 | off += optlen; |
163 | len -= optlen; | 163 | len -= optlen; |
164 | } | 164 | } |
165 | /* This case will not be caught by above check since its padding | ||
166 | * length is smaller than 7: | ||
167 | * 1 byte NH + 1 byte Length + 6 bytes Padding | ||
168 | */ | ||
169 | if ((padlen == 6) && ((off - skb_network_header_len(skb)) == 8)) | ||
170 | goto bad; | ||
171 | 165 | ||
172 | if (len == 0) | 166 | if (len == 0) |
173 | return true; | 167 | return true; |