diff options
author | William Tu <u9012063@gmail.com> | 2020-04-26 08:04:15 -0700 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2020-04-30 02:40:10 +0000 |
commit | 846b6b2da8358d34aa4be8b310f90195e134b5b0 (patch) | |
tree | b242d047197ffc4f91d63949348e29a6638d825e /ip/link_gre.c | |
parent | 0c42c6b130196d1d7e87acc5122f8fd325e75c5b (diff) |
erspan: Add type I version 0 support.
The Type I ERSPAN frame format is based on the barebones
IP + GRE(4-byte) encapsulation on top of the raw mirrored frame.
Both type I and II use 0x88BE as protocol type. Unlike type II
and III, no sequence number or key is required.
To creat a type I erspan tunnel device:
$ ip link add dev erspan11 type erspan \
local 172.16.1.100 remote 172.16.1.200 \
erspan_ver 0
CC: Dmitriy Andreyevskiy <dandreye@cisco.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Diffstat (limited to 'ip/link_gre.c')
-rw-r--r-- | ip/link_gre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ip/link_gre.c b/ip/link_gre.c index d616a970..0461e5d0 100644 --- a/ip/link_gre.c +++ b/ip/link_gre.c @@ -354,8 +354,8 @@ get_failed: NEXT_ARG(); if (get_u8(&erspan_ver, *argv, 0)) invarg("invalid erspan version\n", *argv); - if (erspan_ver != 1 && erspan_ver != 2) - invarg("erspan version must be 1 or 2\n", *argv); + if (erspan_ver > 2) + invarg("erspan version must be 0/1/2\n", *argv); } else if (is_erspan && strcmp(*argv, "erspan_dir") == 0) { NEXT_ARG(); if (matches(*argv, "ingress") == 0) |