public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Ahmed Abdelsalam <amsalam20@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	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
Date: Mon, 23 Apr 2018 22:08:44 +0200	[thread overview]
Message-ID: <20180423200844.bq3ksj262brrifnj@breakpoint.cc> (raw)
In-Reply-To: <20180423220148.03800031d0cb8e8a7a83dc31@gmail.com>

Ahmed Abdelsalam <amsalam20@gmail.com> 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.

  reply	other threads:[~2018-04-23 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 10:48 [iptables 1/2] extensions: libip6t_srh: support matching previous, next and last SID Ahmed Abdelsalam
2018-04-23 10:48 ` [nf-next] netfilter: extend SRH match to " Ahmed Abdelsalam
2018-04-23 17:30   ` Pablo Neira Ayuso
2018-04-23 20:01     ` Ahmed Abdelsalam
2018-04-23 20:08       ` Florian Westphal [this message]
2018-04-23 20:16         ` Ahmed Abdelsalam
2018-04-23 10:48 ` [iptables 2/2] extensions: libip6t_srh: add test-cases for " Ahmed Abdelsalam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180423200844.bq3ksj262brrifnj@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=amsalam20@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=dav.lebrun@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox