Received: by 10.192.165.148 with SMTP id m20csp3829960imm; Mon, 23 Apr 2018 13:10:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx49iMKvm3TUiDH+eYv1ObNtSEeiZLT12UKjxqi5yv/p7bv/U0kFXK6lh0Lzr4AZJ7HpUKEnH X-Received: by 10.99.167.75 with SMTP id w11mr17926594pgo.351.1524514221964; Mon, 23 Apr 2018 13:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524514221; cv=none; d=google.com; s=arc-20160816; b=xTSXbPJ2/VkbIkQ0Il1TecMJWtMPTx8breK8xbBdTGOEkjaZF/00GnL071uk3pcaGV 7d2lJCq/52pCT/iCg2C30Uyy88Kaz5E8gP0CbtMRk3wctoBaYEheF6JsRbC3a6Fdhnqx 0/lltRVO/5btALS1b9SDaewsldS00cVBHziYXpeG53SE1fXKCcOxqhUTj9VF9ClWXtIg 4rivUy5KN3phogsF2dKjOUFLyq259bMTpVXmLJarpYdSyQIj0cLPGnGZIAGLLU/nbzvL 6vUVPB8/hRqbY1RrnuySq07N/8Cd/28bfbJerqAVGfEREazgWZWX0JZNpLPqJQFekBKL cKwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TWG1iW4cnVw+CdN3BmlDk7T4EyGYX7B+uinqCEkWSjo=; b=kvmftgd1NwaDAx+/GjuqYcZqaaQt7U6cA1zOzRufABKnvbM6O74e3FMPiPsi443/Lf hu55lTmn9wEqXPdLkaYE634ODZkyb5SnJp3FJBO1z8oamu0N352vXIF2YNpFndEiMoVi gOpAUBCkQKuSRpqcFMBEcvRqUqbRUjK7J15NYOba2CvDwMCFQO5zpDK4X52u5YBPIW3r ffUHlQ/eEj8MXB86y39XAFhhCW2wIAhj4LBZ+SQQzHK5Jp9ebYRZD6DpLq28wlpAbG/D d4Pi98qLPh/aK7xJw1O2836/BGWFL9IhjaeBPenQ/ePavo0OqW0gpBc7GxjPNcl4cBGH UXaA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si10286839pgb.434.2018.04.23.13.10.07; Mon, 23 Apr 2018 13:10:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbeDWUIy (ORCPT + 99 others); Mon, 23 Apr 2018 16:08:54 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:40864 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932306AbeDWUIv (ORCPT ); Mon, 23 Apr 2018 16:08:51 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.89) (envelope-from ) id 1fAhlU-0003b7-Dp; Mon, 23 Apr 2018 22:08:44 +0200 Date: Mon, 23 Apr 2018 22:08:44 +0200 From: Florian Westphal To: Ahmed Abdelsalam Cc: Pablo Neira Ayuso , fw@strlen.de, 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423220148.03800031d0cb8e8a7a83dc31@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.