• E
    ipv6/exthdrs: strict Pad1 and PadN check · 9b905fe6
    Eldad Zack 提交于
    The following tightens the padding check from commit
    c1412fce :
    
    * 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: NEldad Zack <eldad@fogrefinery.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    9b905fe6
exthdrs.c 21.9 KB