From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2-next v2 0/4] ip/tunnel: Unify local/remote endpoint address parsing Date: Sun, 11 Feb 2018 22:02:29 +0200 Message-ID: <1518379353-31995-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f68.google.com ([209.85.215.68]:37105 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753587AbeBKUCi (ORCPT ); Sun, 11 Feb 2018 15:02:38 -0500 Received: by mail-lf0-f68.google.com with SMTP id f137so17808116lfe.4 for ; Sun, 11 Feb 2018 12:02:38 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id s20sm1283327ljd.79.2018.02.11.12.02.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 12:02:35 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: Use get_addr_rta() helper to unify address retriveal from netlink message when configuring tunnel and get_addr() to parse endpoint address into @inet_prefix. This is next step towards ip and ipv6 tunnel module merge: endpoint address parsing code will differ only in @family constant being passed to get_addr_rta() and get_addr(). Reviews, comments and suggestions are welcome. v2 Introduce and use inet_prefix_reset_flags() inline helper to initialize @inet_prefix data structure and make code self exmplaining. Set bitlen to zero in link_iptnl.c when kernel does not send corresponding prefixlen and we configure existing tunnel. Thanks, Serhey Serhey Popovych (4): utils: Introduce and use inet_prefix_reset_flags() vti/vti6: Unify local/remote endpoint address parsing gre/gre6: Unify local/remote endpoint address parsing iptnl/ip6tnl: Unify local/remote endpoint and 6rd address parsing include/utils.h | 5 +++ ip/iplink_geneve.c | 2 +- ip/iplink_vxlan.c | 7 ++-- ip/link_gre.c | 57 +++++++++++++++++------------ ip/link_gre6.c | 38 ++++++++++--------- ip/link_ip6tnl.c | 40 +++++++++++--------- ip/link_iptnl.c | 103 ++++++++++++++++++++++++++-------------------------- ip/link_vti.c | 32 ++++++++++------ ip/link_vti6.c | 38 ++++++++++--------- 9 files changed, 177 insertions(+), 145 deletions(-) -- 1.7.10.4