diff --git a/ip/link_gre.c b/ip/link_gre.c index f55c40c7..896bb19a 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 0a471c2d..84205b12 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