Re: [PATCH] ipv6/exthdrs: strict Pad1 and PadN check

From: David Miller
Date: Sun May 20 2012 - 17:02:33 EST


From: Eldad Zack <eldad@xxxxxxxxxxxxxxx>
Date: Sun, 20 May 2012 13:59:33 +0200

> The following tightens the padding check from commit
> c1412fce7eccae62b4de22494f6ab3ff8a90c0c6 :
>
> * Take into account combinations of consecutive Pad1 and PadN.
>
> * Catch the corner case of when only padding is present in the
> header, when the extention header length is 0 (i.e., 8 bytes).
> In this case, the header would have exactly 6 bytes of padding:
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> : Next Header : Hdr Ext Len=0 : :
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
> : Padding (Pad1 or PadN) :
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> Signed-off-by: Eldad Zack <eldad@xxxxxxxxxxxxxxx>

Applied to net-next, thanks a lot.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/