lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVpQUD4Z-UrANUtdrt5v8xwB5-Qfi+hVUcFr=FZc1eohYU7QA@mail.gmail.com>
Date: Wed, 13 Aug 2025 10:55:54 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: Richard Gobert <richardbgobert@...il.com>, andrew+netdev@...n.ch, daniel@...earbox.net, 
	davem@...emloft.net, donald.hunter@...il.com, dsahern@...nel.org, 
	edumazet@...gle.com, horms@...nel.org, jacob.e.keller@...el.com, 
	kuba@...nel.org, linux-kernel@...r.kernel.org, martin.lau@...nel.org, 
	menglong8.dong@...il.com, netdev@...r.kernel.org, pabeni@...hat.com, 
	petrm@...dia.com, razor@...ckwall.org, shuah@...nel.org
Subject: Re: [PATCH net-next v5 2/5] net: vxlan: add netlink option to bind
 vxlan sockets to local addresses

On Wed, Aug 13, 2025 at 9:04 AM Ido Schimmel <idosch@...dia.com> wrote:
>
> On Wed, Aug 13, 2025 at 05:46:44PM +0200, Richard Gobert wrote:
> > Kuniyuki Iwashima wrote:
> > > From: Richard Gobert <richardbgobert@...il.com>
> > >> @@ -4044,15 +4045,37 @@ static int vxlan_nl2conf(struct nlattr *tb[], struct nlattr *data[],
> > >>            conf->vni = vni;
> > >>    }
> > >>
> > >> +  if (data[IFLA_VXLAN_LOCALBIND]) {
> > >> +          if (changelink) {
> > >> +                  NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LOCALBIND], "Cannot rebind locally");
> > >> +                  return -EOPNOTSUPP;
> > >> +          }
> > >
> > > Are these two "if" necessary ?
> >
> > Creating a vxlan interface without localbind then adding localbind won't
> > result in the socket being rebound. I might implement this in the future,
> > but for simplicity, I didn't implement this yet.
>
> I think Kuniyuki meant that you can just call vxlan_nl2flag() without
> those two "if"s because the function is a NO-OP when the attribute is
> not present and it will also fail the changelink operation.

Yes, I don't know why other places were not converted as such
when vxlan_nl2flag() was introduced in 70fb0828800b.

>
> >
> > >
> > >
> > >> +
> > >> +          err = vxlan_nl2flag(conf, data, IFLA_VXLAN_LOCALBIND,
> > >> +                              VXLAN_F_LOCALBIND, changelink,
> > >> +                              false, extack);
> > >> +          if (err)
> > >> +                  return err;
> > >> +  }
> > >> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ