net: fix address check in rtnl_fdb_del
Subsystems (2)
PATCH 1/1 net: fix address check in rtnl_fdb_del
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.
--- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/rtnetlink.c +1 -1
@@ -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)) {pr_info ("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n" );return -EINVAL ; }
Signature · 1 line
1.8.1.4
Quoted 20 lines · Vlad Yasevich
Commit
6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tablesrelaxed the address checks in
rtnl_fdb_del()to useis_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check inrtnl_fdb_del()still uses a more strictis_valid_ether_addr()which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check inrtnl_fdb_del()as well.Signed-off-by Vlad Yasevich <[email protected]>--- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/core/rtnetlink.c +0
-0
net/core/rtnetlink.c static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh) · line 2195
Quoted 5 lines
net/core/rtnetlink.c +1
-1@@ -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.
Ben.
Quoted 3 lines
net/core/rtnetlink.c +0
-0pr_info ("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n" );return -EINVAL ; }
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Quoted 23 lines · Ben Hutchings
Quoted 22 lines · Vlad Yasevich
Commit
6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tablesrelaxed the address checks in
rtnl_fdb_del()to useis_zero_ether_addr(). This allows users to add multicast addresses using the fdb API. However, the check inrtnl_fdb_del()still uses a more strictis_valid_ether_addr()which rejects multicast addresses. Thus it is possible to add an fdb that can not be later removed. Relax the check inrtnl_fdb_del()as well.Signed-off-by Vlad Yasevich <[email protected]>--- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/core/rtnetlink.c +0
-0@@ -2192,7 +2192,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh) }
Quoted 5 lines
net/core/rtnetlink.c static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh) · line 2195
Quoted 3 lines
net/core/rtnetlink.c +1
-1addr =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
Quoted 7 lines
Ben.
Quoted 3 lines
net/core/rtnetlink.c +0
-0pr_info ("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n" );return -EINVAL ; }
David Miller
maintainerFrom: Vlad Yasevich <[email protected]>
Date: Tue, 23 Apr 2013 17:04:46 -0400
Quoted 6 lines · Ben Hutchings
Quoted 5 lines · Vlad Yasevich
Quoted 4 lines
(quoted diff) +0
-0@@ -2192,7 +2192,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh) }
Quoted 7 lines
Quoted 5 lines
net/core/rtnetlink.c static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh) · line 2195
Quoted 3 lines
net/core/rtnetlink.c +1
-1addr =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 '!'...
Please test your patches.
If this patch is so unimportant that you don't feel inclined to test it, it's probably not important enough for me to apply either.