netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com
Subject: Re: [PATCH ipsec-next 1/7] xfrm: add extack support to verify_newsa_info
Date: Tue, 20 Sep 2022 17:55:28 +0200	[thread overview]
Message-ID: <YynicFZpq2Z64u86@hog> (raw)
In-Reply-To: <20220919170038.23b6d58e@kernel.org>

2022-09-19, 17:00:38 -0700, Jakub Kicinski wrote:
> On Wed, 14 Sep 2022 19:04:00 +0200 Sabrina Dubroca wrote:
> >  	case IPPROTO_COMP:
> > +		if (!attrs[XFRMA_ALG_COMP]) {
> > +			NL_SET_ERR_MSG(extack, "Missing required attribute for COMP: COMP");
> > +			goto out;
> > +		}
> 
> Did NL_SET_ERR_ATTR_MISS() make it to the xfrm tree?

No, it hasn't. Thanks for the note, I hadn't seen those patches.

It would only solve part of the problem here, since some cases need
one of two possible attributes (AH needs AUTH or AUTH_TRUNC, ESP needs
AEAD or CRYPT).

In this particular case, it's also a bit confusing because which
attribute is required (or not allowed) depends on other parts of the
configuration, so there isn't a way to express most of it outside of
strings -- short of having netlink policies or extacks that can
describe logical formulas, I guess.

-- 
Sabrina


  reply	other threads:[~2022-09-20 15:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 17:03 [PATCH ipsec-next 0/7] xfrm: add netlink extack for state creation Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 1/7] xfrm: add extack support to verify_newsa_info Sabrina Dubroca
2022-09-20  0:00   ` Jakub Kicinski
2022-09-20 15:55     ` Sabrina Dubroca [this message]
2022-09-20 17:11       ` Jakub Kicinski
2022-09-14 17:04 ` [PATCH ipsec-next 2/7] xfrm: add extack to verify_replay Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 3/7] xfrm: add extack to verify_one_alg, verify_auth_trunc, verify_aead Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 4/7] xfrm: add extack support to xfrm_dev_state_add Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 5/7] xfrm: add extack to attach_* Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 6/7] xfrm: add extack to __xfrm_init_state Sabrina Dubroca
2022-09-14 17:04 ` [PATCH ipsec-next 7/7] xfrm: add extack support to xfrm_init_replay Sabrina Dubroca
2022-09-24  7:54 ` [PATCH ipsec-next 0/7] xfrm: add netlink extack for state creation Steffen Klassert

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=YynicFZpq2Z64u86@hog \
    --to=sd@queasysnail.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /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;
as well as URLs for NNTP newsgroup(s).