Received: by 10.192.165.148 with SMTP id m20csp3835708imm; Mon, 23 Apr 2018 13:17:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zZxo+Tpm3sV5wxLh5qioWoShC2ZP8U5BFjVp4NAYWPclAEQGbkvNaUKm7zQCTmr6I0oA5 X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr22090566plb.140.1524514643305; Mon, 23 Apr 2018 13:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524514643; cv=none; d=google.com; s=arc-20160816; b=Hmr5cBVY+wmAea96AiORFQxjgR5eu1V8wSliFZCd1QajtN/mn8Y8xp1TB4BLu8Ce4/ hKLlifNFNzI8f1XRzlq6pPVplBH/2VyJRPNrJu0sMmIwTcdAv4zIP7OU4t2PlVblaJjr D+NObGdyg2foCVBxFFNcjdjf/df8/RPyfduvx9EJ9pjsXlSfXM8cY1l3VfdSVZJvAnFz CCI0o2fGAme9oIYpy187Eojtf2k5yp4DbqFMj48uNQ2aINcf7QOsmLQtRD3G1dONCrEe fJ4AX47aXoMa+gj52onrHE7O6XK8QJfqw/nq2/LaQ8ZtbLQ7u3TbX+YiuKq/12neHdy7 M9eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=1PENDMFnsf4FIFjCg5T02o0T8FrE36xc7WkWdAFcA2g=; b=rE+YwRuys+PiR8YP2BCzxzYSpdD+qxkBNG+DtEX1hm5zDIpcPQSwScx/l3pKbh/g71 g9IzzHnpBnbBM0YLL0PSTRWAw7G8qoNOoJGKLsN38+v3YVxqR4LNu+KBz7BqqZRUabh4 tjggAR9M66PYVhngj0VTF0099QYBNTsZ7XAvav9QJd3smshr/85ObsWJNRxaILkzVRUN HBvrGEErLwbvW1vM7eBJuTN21ZJgRSJ/GAcm3CSJG7s5QDwc+u2s5b8q+6dWuQuaDktA wAFIwFO2QZscjSR/lqSaih8WvC5K2dlzQ5T6pDAzKRfCydHnxam+DlReQCV6powgJpUW Cwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ri2kJ1Og; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s88si12285956pfe.290.2018.04.23.13.17.08; Mon, 23 Apr 2018 13:17:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ri2kJ1Og; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbeDWUQH (ORCPT + 99 others); Mon, 23 Apr 2018 16:16:07 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36103 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932335AbeDWUQE (ORCPT ); Mon, 23 Apr 2018 16:16:04 -0400 Received: by mail-wr0-f196.google.com with SMTP id u18-v6so17386584wrg.3; Mon, 23 Apr 2018 13:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1PENDMFnsf4FIFjCg5T02o0T8FrE36xc7WkWdAFcA2g=; b=Ri2kJ1OgyeuyhpiwhAC9nb1dCNTC2rMxgq+bGnMS9x0qyaaSR5X8ctceS4XrZP3qax g88OkcdxG5mF76mt9tCSEj9NOvIwsXA0a5ZjK+C+8dB4a2iv0Cgij3pCFRWS7i76C/QY RAjcZdqWWe3Dq4LYcP/4j3hE3Jw7W5f1ZJ0gbNo1r5YgKhGeY/vsr7I8HmRl/zHRsK2W V4gOcyfxt2abtPPUnrdSsL84oWmPb2fXuZmYKs7uxvZXqYGvdbYPrszToTW/3g8MOl6L 9HEYDX0mi7ED4kho/VckFCl2yaSlTgoYW3/R8+AtMT9vrCmA/4oWA22PaTxOY0dPDxgQ afBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1PENDMFnsf4FIFjCg5T02o0T8FrE36xc7WkWdAFcA2g=; b=ooyxch8WLcilYTHoKGrJadHzUbeXKyuilZs3F9rSzd15nRNO/tShBkoa5qb7KiT1Ns z/BZNXB3PRw/LsSLZiYvZPoy7N3egcNMfQwh/iIBI5Q2FKZtf3liykpamPNHVWvTWdSc CURizbRumr0JxtoM4BZ7g/f21wzi5Zk2CFw89jtk4RfX2AsiSbq1isONpqCEJ8Kcyud5 WYWeDmReoB84doUJBi+qZ5B+qJFuBulSiwtwP/2V4miq2iwCs6Eek2y4FyaKm9FI15z3 e6VSuSghKIcaEVaVLKlJp/Eyqi/9DtRkPiljEqZFUTC0l8htUA9ZQ+vl2QT1WX7CFhm+ dCuQ== X-Gm-Message-State: ALQs6tCG8KHV//vP3wsr9NKb2n4MmzAIpZnyyj+4l4T4dxvmIAqU9cPb x1KB+plrCUz1rmJvMF3dxfw= X-Received: by 2002:adf:c792:: with SMTP id l18-v6mr18247617wrg.224.1524514562519; Mon, 23 Apr 2018 13:16:02 -0700 (PDT) Received: from AHABDELS-M-M2VD (wifi-guest-target.gssi.infn.it. [192.135.27.147]) by smtp.gmail.com with ESMTPSA id u14-v6sm12575546wri.31.2018.04.23.13.16.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Apr 2018 13:16:01 -0700 (PDT) Date: Mon, 23 Apr 2018 22:16:00 +0200 From: Ahmed Abdelsalam To: Florian Westphal Cc: Pablo Neira Ayuso , davem@davemloft.net, dav.lebrun@gmail.com, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Subject: Re: [nf-next] netfilter: extend SRH match to support matching previous, next and last SID Message-Id: <20180423221600.4d373f3961a1bbe91743b998@gmail.com> In-Reply-To: <20180423200844.bq3ksj262brrifnj@breakpoint.cc> References: <1524480503-1883-1-git-send-email-amsalam20@gmail.com> <1524480503-1883-2-git-send-email-amsalam20@gmail.com> <20180423173047.gsf2xjlmpichyvte@salvia> <20180423220148.03800031d0cb8e8a7a83dc31@gmail.com> <20180423200844.bq3ksj262brrifnj@breakpoint.cc> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.21; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Apr 2018 22:08:44 +0200 Florian Westphal wrote: > Ahmed Abdelsalam wrote: > > > > @@ -50,6 +62,12 @@ struct ip6t_srh { > > > > __u8 segs_left; > > > > __u8 last_entry; > > > > __u16 tag; > > > > + struct in6_addr psid_addr; > > > > + struct in6_addr nsid_addr; > > > > + struct in6_addr lsid_addr; > > > > + struct in6_addr psid_msk; > > > > + struct in6_addr nsid_msk; > > > > + struct in6_addr lsid_msk; > > > > > > This is changing something exposed through UAPI, so you will need a > > > new revision for this. > > > > Could you please advice what should be done in this case? > > You need to add > struct ip6t_srh_v1 { > /* copy of struct ip6t_srh here */ > > /* new fields go here */ > }; > > > Look at xt_conntrack.c, conntrack_mt_reg[] for an example of > multi-revision match. > > You can probably re-origanise code to avoid too much duplication. > See 5a786232eb69a1f870ddc0cfd69d5bdef241a2ea in nf.git for an example, > it makes v0 into a v1 struct at runtime and re-uses new v1 code > for old v0. > > Thanks Florian! -- Ahmed Abdelsalam