Message ID | 0abbe3fb8e20741c17fe3a0ecbca9ccd4f8ab96b.1581994848.git.lucien.xin@gmail.com |
---|---|
State | Superseded |
Delegated to: | stephen hemminger |
Headers | show |
Series | [PATCHv2,iproute2] erspan: set erspan_ver to 1 by default | expand |
On 2/17/20 8:00 PM, Xin Long wrote: > Commit 289763626721 ("erspan: add erspan version II support") > breaks the command: > > # ip link add erspan1 type erspan key 1 seq erspan 123 \ > local 10.1.0.2 remote 10.1.0.1 > > as erspan_ver is set to 0 by default, then IFLA_GRE_ERSPAN_INDEX > won't be set in gre_parse_opt(). > > # ip -d link show erspan1 > ... > erspan remote 10.1.0.1 local 10.1.0.2 ... erspan_index 0 erspan_ver 1 > ^^^^^^^^^^^^^^ > > This patch is to change to set erspan_ver to 1 by default. > > Fixes: 289763626721 ("erspan: add erspan version II support") > Signed-off-by: Xin Long <lucien.xin@gmail.com> > --- > ip/link_gre.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ip/link_gre.c b/ip/link_gre.c > index 15beb73..e42f21a 100644 > --- a/ip/link_gre.c > +++ b/ip/link_gre.c > @@ -94,7 +94,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv, > __u8 metadata = 0; > __u32 fwmark = 0; > __u32 erspan_idx = 0; > - __u8 erspan_ver = 0; > + __u8 erspan_ver = 1; > __u8 erspan_dir = 0; > __u16 erspan_hwid = 0; > > re-send of v1? lacks the v6 change too.
On Tue, Feb 18, 2020 at 11:11 AM David Ahern <dsahern@gmail.com> wrote: > > On 2/17/20 8:00 PM, Xin Long wrote: > > Commit 289763626721 ("erspan: add erspan version II support") > > breaks the command: > > > > # ip link add erspan1 type erspan key 1 seq erspan 123 \ > > local 10.1.0.2 remote 10.1.0.1 > > > > as erspan_ver is set to 0 by default, then IFLA_GRE_ERSPAN_INDEX > > won't be set in gre_parse_opt(). > > > > # ip -d link show erspan1 > > ... > > erspan remote 10.1.0.1 local 10.1.0.2 ... erspan_index 0 erspan_ver 1 > > ^^^^^^^^^^^^^^ > > > > This patch is to change to set erspan_ver to 1 by default. > > > > Fixes: 289763626721 ("erspan: add erspan version II support") > > Signed-off-by: Xin Long <lucien.xin@gmail.com> > > --- > > ip/link_gre.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/ip/link_gre.c b/ip/link_gre.c > > index 15beb73..e42f21a 100644 > > --- a/ip/link_gre.c > > +++ b/ip/link_gre.c > > @@ -94,7 +94,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv, > > __u8 metadata = 0; > > __u32 fwmark = 0; > > __u32 erspan_idx = 0; > > - __u8 erspan_ver = 0; > > + __u8 erspan_ver = 1; > > __u8 erspan_dir = 0; > > __u16 erspan_hwid = 0; > > > > > > re-send of v1? lacks the v6 change too. sorry, :D already posted v3.
diff --git a/ip/link_gre.c b/ip/link_gre.c index 15beb73..e42f21a 100644 --- a/ip/link_gre.c +++ b/ip/link_gre.c @@ -94,7 +94,7 @@ static int gre_parse_opt(struct link_util *lu, int argc, char **argv, __u8 metadata = 0; __u32 fwmark = 0; __u32 erspan_idx = 0; - __u8 erspan_ver = 0; + __u8 erspan_ver = 1; __u8 erspan_dir = 0; __u16 erspan_hwid = 0;
Commit 289763626721 ("erspan: add erspan version II support") breaks the command: # ip link add erspan1 type erspan key 1 seq erspan 123 \ local 10.1.0.2 remote 10.1.0.1 as erspan_ver is set to 0 by default, then IFLA_GRE_ERSPAN_INDEX won't be set in gre_parse_opt(). # ip -d link show erspan1 ... erspan remote 10.1.0.1 local 10.1.0.2 ... erspan_index 0 erspan_ver 1 ^^^^^^^^^^^^^^ This patch is to change to set erspan_ver to 1 by default. Fixes: 289763626721 ("erspan: add erspan version II support") Signed-off-by: Xin Long <lucien.xin@gmail.com> --- ip/link_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)