erspan: set bso bit based on mirrored packet's len
authorWilliam Tu <u9012063@gmail.com>
Sat, 19 May 2018 02:41:01 +0000 (19:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 May 2018 22:31:42 +0000 (18:31 -0400)
commitd48f1958ab7d9fb896d86f0241f0dc83dc3a63de
tree2bf1ebe8dd0881b30d836443f76f0ca712d6978a
parent2c71ab4bb465c79a4687cc2fd5012e470aebdb1f
erspan: set bso bit based on mirrored packet's len

Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not
handled.  BSO has 4 possible values:
  00 --> Good frame with no error, or unknown integrity
  11 --> Payload is a Bad Frame with CRC or Alignment Error
  01 --> Payload is a Short Frame
  10 --> Payload is an Oversized Frame

Based the short/oversized definitions in RFC1757, the patch sets
the bso bit based on the mirrored packet's size.

Reported-by: Xiaoyan Jin <xiaoyanj@vmware.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/erspan.h