From: Vlad Yasevich <vyasevic@redhat.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, dlstevens@us.ibm.com
Subject: Re: [PATCH net-next] net: fix address check in rtnl_fdb_del
Date: Tue, 23 Apr 2013 17:04:46 -0400 [thread overview]
Message-ID: <5176F76E.6070406@redhat.com> (raw)
In-Reply-To: <1366750075.4016.34.camel@bwh-desktop.uk.solarflarecom.com>
On 04/23/2013 04:47 PM, Ben Hutchings wrote:
> On Tue, 2013-04-23 at 16:39 -0400, Vlad Yasevich wrote:
>> Commit 6681712d67eef14c4ce793561c3231659153a320
>> vxlan: generalize forwarding tables
>>
>> relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr().
>> This allows users to add multicast addresses using the fdb API. However,
>> the check in rtnl_fdb_del() still uses a more strict
>> is_valid_ether_addr() which rejects multicast addresses. Thus it
>> is possible to add an fdb that can not be later removed.
>> Relax the check in rtnl_fdb_del() as well.
>>
>> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
>> ---
>> net/core/rtnetlink.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>> index 18af08a..2c54cc1 100644
>> --- a/net/core/rtnetlink.c
>> +++ b/net/core/rtnetlink.c
>> @@ -2192,7 +2192,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
>> }
>>
>> addr = nla_data(tb[NDA_LLADDR]);
>> - if (!is_valid_ether_addr(addr)) {
>> + if (!is_zero_ether_addr(addr)) {
>
> This is the opposite of what you want.
of course you are right.... totally forgot the '!'...
Thanks
-vlad
>
> Ben.
>
>> pr_info("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n");
>> return -EINVAL;
>> }
>
next prev parent reply other threads:[~2013-04-23 21:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 20:39 [PATCH net-next] net: fix address check in rtnl_fdb_del Vlad Yasevich
2013-04-23 20:47 ` Ben Hutchings
2013-04-23 21:04 ` Vlad Yasevich [this message]
2013-04-23 22:29 ` David Miller
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=5176F76E.6070406@redhat.com \
--to=vyasevic@redhat.com \
--cc=bhutchings@solarflare.com \
--cc=dlstevens@us.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.