Skip to content

Commit

Permalink
ipv6/exthdrs: accept tlv which includes only padding
Browse files Browse the repository at this point in the history
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:
9b905fe "ipv6/exthdrs: strict Pad1 and PadN check"

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Sep 11, 2013
1 parent 996dedb commit 8112b1f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,6 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs, struct sk_buff *skb)
off += optlen;
len -= optlen;
}
/* This case will not be caught by above check since its padding
* length is smaller than 7:
* 1 byte NH + 1 byte Length + 6 bytes Padding
*/
if ((padlen == 6) && ((off - skb_network_header_len(skb)) == 8))
goto bad;

if (len == 0)
return true;
Expand Down

0 comments on commit 8112b1f

Please sign in to comment.