netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: Michal Kubecek <mkubecek@suse.cz>
Subject: Re: [RFC v2 2/2] netlink: add ethernet address policy types
Date: Wed, 12 Sep 2018 10:50:36 +0200	[thread overview]
Message-ID: <1536742236.3678.10.camel@sipsolutions.net> (raw)
In-Reply-To: <5B98D336.4090107@broadcom.com> (sfid-20180912_105004_080743_245162B9)

On Wed, 2018-09-12 at 10:49 +0200, Arend van Spriel wrote:
> On 9/12/2018 10:36 AM, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > Commonly, ethernet addresses are just using a policy of
> > 	{ .len = ETH_ALEN }
> > which leaves userspace free to send more data than it should,
> > which may hide bugs.
> > 
> > Introduce NLA_ETH_ADDR which checks for exact size, and rejects
> > the attribute if the length isn't ETH_ALEN.
> > 
> > Also add NLA_ETH_ADDR_COMPAT which can be used in place of the
> > policy above, but will, in addition, warn on an address that's
> > too long.
> 
> Not sure if this is correctly described here. It seems longer addresses 
> are not rejected, but only result in a warning message. I guess the 
> problem is in the reference to the "policy above" ;-)

Yeah, good point. I meant ".len = ETH_ALEN" but should clarify that.

johannes

  reply	other threads:[~2018-09-12 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  8:36 [RFC v2 1/2] netlink: add NLA_REJECT policy type Johannes Berg
     [not found] ` <20180912083610.20857-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-09-12  8:36   ` [RFC v2 2/2] netlink: add ethernet address policy types Johannes Berg
2018-09-12  8:49     ` Arend van Spriel
2018-09-12  8:50       ` Johannes Berg [this message]
2018-09-12 18:15   ` [RFC v2 1/2] netlink: add NLA_REJECT policy type David Miller
2018-09-12 18:34     ` Johannes Berg
     [not found]       ` <1536777285.3678.28.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2018-09-12 19:29         ` Michal Kubecek
2018-09-12 19:37           ` Johannes Berg
2018-09-12  8:38 ` Johannes Berg

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=1536742236.3678.10.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend.vanspriel@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).