From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 3/3] link_vti6: Always add local/remote endpoint attributes Date: Mon, 18 Dec 2017 19:48:05 +0200 Message-ID: <1513619285-23187-4-git-send-email-serhe.popovych@gmail.com> References: <1513619285-23187-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:38921 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937657AbdLRRsP (ORCPT ); Mon, 18 Dec 2017 12:48:15 -0500 Received: by mail-lf0-f67.google.com with SMTP id m20so5604945lfi.6 for ; Mon, 18 Dec 2017 09:48:14 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id v86sm1031988lfd.65.2017.12.18.09.48.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 09:48:12 -0800 (PST) In-Reply-To: <1513619285-23187-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: All tunnels already support for parsing/adding zero endpoints and vti6 isn't an exception. This check was added as part of commit 2a80154fde40 (vti6: fix local/remote any addr handling) and looks too restrictive as purpose of change is to avoid endpoint configuration from uninitialized data. Signed-off-by: Serhey Popovych --- ip/link_vti6.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ip/link_vti6.c b/ip/link_vti6.c index f631839..4136b0e 100644 --- a/ip/link_vti6.c +++ b/ip/link_vti6.c @@ -154,10 +154,8 @@ get_failed: addattr32(n, 1024, IFLA_VTI_IKEY, ikey); addattr32(n, 1024, IFLA_VTI_OKEY, okey); - if (memcmp(&saddr, &in6addr_any, sizeof(in6addr_any))) - addattr_l(n, 1024, IFLA_VTI_LOCAL, &saddr, sizeof(saddr)); - if (memcmp(&daddr, &in6addr_any, sizeof(in6addr_any))) - addattr_l(n, 1024, IFLA_VTI_REMOTE, &daddr, sizeof(daddr)); + addattr_l(n, 1024, IFLA_VTI_LOCAL, &saddr, sizeof(saddr)); + addattr_l(n, 1024, IFLA_VTI_REMOTE, &daddr, sizeof(daddr)); addattr32(n, 1024, IFLA_VTI_FWMARK, fwmark); if (link) addattr32(n, 1024, IFLA_VTI_LINK, link); -- 1.7.10.4