* [PATCH iproute2 1/3] ip/ip6tunnel: fix help for TCLASS
@ 2012-11-14 15:29 Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 2/3] ip/ip6tunnel: reset encap limit flag on change Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel Nicolas Dichtel
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
Help is "[tclass TCLASS]", but only TOS was described.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ip6tunnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index c9720eb..b23377a 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -60,7 +60,7 @@ static void usage(void)
IPV6_DEFAULT_TNL_ENCAP_LIMIT);
fprintf(stderr, " TTL := 0..255 (default=%d)\n",
DEFAULT_TNL_HOP_LIMIT);
- fprintf(stderr, " TOS := { 0x0..0xff | inherit }\n");
+ fprintf(stderr, " TCLASS := { 0x0..0xff | inherit }\n");
fprintf(stderr, " FLOWLABEL := { 0x0..0xfffff | inherit }\n");
exit(-1);
}
--
1.7.12
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH iproute2 2/3] ip/ip6tunnel: reset encap limit flag on change
2012-11-14 15:29 [PATCH iproute2 1/3] ip/ip6tunnel: fix help for TCLASS Nicolas Dichtel
@ 2012-11-14 15:29 ` Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel Nicolas Dichtel
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
Flag IP6_TNL_F_IGN_ENCAP_LIMIT is set when encaplimit is none, but it was not
removed if encaplimit was set on update (ip tunnel change).
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ip6tunnel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index b23377a..7aaac61 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -157,6 +157,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
if (get_u8(&uval, *argv, 0) < -1)
invarg("invalid ELIM", *argv);
p->encap_limit = uval;
+ p->flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
}
} else if (strcmp(*argv, "hoplimit") == 0 ||
strcmp(*argv, "ttl") == 0 ||
--
1.7.12
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel
2012-11-14 15:29 [PATCH iproute2 1/3] ip/ip6tunnel: fix help for TCLASS Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 2/3] ip/ip6tunnel: reset encap limit flag on change Nicolas Dichtel
@ 2012-11-14 15:29 ` Nicolas Dichtel
2012-11-16 16:16 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Dichtel @ 2012-11-14 15:29 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
When tclass or flowlabel field were updated, we only performed an OR with the
new value. For example, it was not possible to reset tclass:
ip -6 tunnel change ip6tnl2 tclass 0
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ip6tunnel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 7aaac61..fcc9f33 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -173,6 +173,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
matches(*argv, "dsfield") == 0) {
__u8 uval;
NEXT_ARG();
+ p->flowinfo &= ~IP6_FLOWINFO_TCLASS;
if (strcmp(*argv, "inherit") == 0)
p->flags |= IP6_TNL_F_USE_ORIG_TCLASS;
else {
@@ -185,6 +186,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
strcmp(*argv, "fl") == 0) {
__u32 uval;
NEXT_ARG();
+ p->flowinfo &= ~IP6_FLOWINFO_FLOWLABEL;
if (strcmp(*argv, "inherit") == 0)
p->flags |= IP6_TNL_F_USE_ORIG_FLOWLABEL;
else {
--
1.7.12
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel
2012-11-14 15:29 ` [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel Nicolas Dichtel
@ 2012-11-16 16:16 ` Stephen Hemminger
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2012-11-16 16:16 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev
On Wed, 14 Nov 2012 16:29:26 +0100
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> When tclass or flowlabel field were updated, we only performed an OR with the
> new value. For example, it was not possible to reset tclass:
> ip -6 tunnel change ip6tnl2 tclass 0
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> ip/ip6tunnel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
> index 7aaac61..fcc9f33 100644
> --- a/ip/ip6tunnel.c
> +++ b/ip/ip6tunnel.c
> @@ -173,6 +173,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
> matches(*argv, "dsfield") == 0) {
> __u8 uval;
> NEXT_ARG();
> + p->flowinfo &= ~IP6_FLOWINFO_TCLASS;
> if (strcmp(*argv, "inherit") == 0)
> p->flags |= IP6_TNL_F_USE_ORIG_TCLASS;
> else {
> @@ -185,6 +186,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
> strcmp(*argv, "fl") == 0) {
> __u32 uval;
> NEXT_ARG();
> + p->flowinfo &= ~IP6_FLOWINFO_FLOWLABEL;
> if (strcmp(*argv, "inherit") == 0)
> p->flags |= IP6_TNL_F_USE_ORIG_FLOWLABEL;
> else {
All applied thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-16 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 15:29 [PATCH iproute2 1/3] ip/ip6tunnel: fix help for TCLASS Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 2/3] ip/ip6tunnel: reset encap limit flag on change Nicolas Dichtel
2012-11-14 15:29 ` [PATCH iproute2 3/3] ip/ip6tunnel: fix update of tclass and flowlabel Nicolas Dichtel
2012-11-16 16:16 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).