From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 1/3] gre,ip6tnl/tunnel: Fix noencap- support Date: Wed, 27 Dec 2017 13:28:14 +0200 Message-ID: <1514374096-1473-2-git-send-email-serhe.popovych@gmail.com> References: <1514374096-1473-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f65.google.com ([209.85.215.65]:36557 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbdL0L3A (ORCPT ); Wed, 27 Dec 2017 06:29:00 -0500 Received: by mail-lf0-f65.google.com with SMTP id c19so22161682lfg.3 for ; Wed, 27 Dec 2017 03:29:00 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id a7sm4313593lfh.10.2017.12.27.03.28.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Dec 2017 03:28:58 -0800 (PST) In-Reply-To: <1514374096-1473-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: We must clear bit, not set all but given bit. Fixes: 858dbb208e39 ("ip link: Add support for remote checksum offload to IP tunnels") Fixes: 73516e128a5a ("ip6tnl: Support for fou encapsulation" Signed-off-by: Serhey Popovych --- ip/link_gre.c | 4 ++-- ip/link_ip6tnl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/link_gre.c b/ip/link_gre.c index f55c40c..896bb19 100644 --- a/ip/link_gre.c +++ b/ip/link_gre.c @@ -281,11 +281,11 @@ get_failed: } else if (strcmp(*argv, "encap-udp6-csum") == 0) { encapflags |= TUNNEL_ENCAP_FLAG_CSUM6; } else if (strcmp(*argv, "noencap-udp6-csum") == 0) { - encapflags |= ~TUNNEL_ENCAP_FLAG_CSUM6; + encapflags &= ~TUNNEL_ENCAP_FLAG_CSUM6; } else if (strcmp(*argv, "encap-remcsum") == 0) { encapflags |= TUNNEL_ENCAP_FLAG_REMCSUM; } else if (strcmp(*argv, "noencap-remcsum") == 0) { - encapflags |= ~TUNNEL_ENCAP_FLAG_REMCSUM; + encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM; } else if (strcmp(*argv, "external") == 0) { metadata = 1; } else if (strcmp(*argv, "ignore-df") == 0) { diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c index 0a471c2..84205b1 100644 --- a/ip/link_ip6tnl.c +++ b/ip/link_ip6tnl.c @@ -301,7 +301,7 @@ get_failed: } else if (strcmp(*argv, "encap-remcsum") == 0) { encapflags |= TUNNEL_ENCAP_FLAG_REMCSUM; } else if (strcmp(*argv, "noencap-remcsum") == 0) { - encapflags |= ~TUNNEL_ENCAP_FLAG_REMCSUM; + encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM; } else if (strcmp(*argv, "external") == 0) { metadata = 1; } else -- 1.7.10.4