diff mbox series

[net,05/16] nl802154: add missing attribute validation for dev_type

Message ID 20200303050526.4088735-6-kuba@kernel.org (mailing list archive)
State Accepted
Headers show
Series None | expand

Commit Message

Jakub Kicinski March 3, 2020, 5:05 a.m. UTC
Add missing attribute type validation for IEEE802154_ATTR_DEV_TYPE
to the netlink policy.

Fixes: 90c049b2c6ae ("ieee802154: interface type to be added")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: Alexander Aring <alex.aring@gmail.com>
CC: Stefan Schmidt <stefan@datenfreihafen.org>
CC: alex.bluesman.smirnov@gmail.com
CC: linux-wpan@vger.kernel.org
---
 net/ieee802154/nl_policy.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefan Schmidt March 3, 2020, 3:39 p.m. UTC | #1
Hello.

On 03.03.20 06:05, Jakub Kicinski wrote:
> Add missing attribute type validation for IEEE802154_ATTR_DEV_TYPE
> to the netlink policy.
> 
> Fixes: 90c049b2c6ae ("ieee802154: interface type to be added")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: Alexander Aring <alex.aring@gmail.com>
> CC: Stefan Schmidt <stefan@datenfreihafen.org>
> CC: alex.bluesman.smirnov@gmail.com
> CC: linux-wpan@vger.kernel.org
> ---
>   net/ieee802154/nl_policy.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/ieee802154/nl_policy.c b/net/ieee802154/nl_policy.c
> index 824e7e84014c..0672b2f01586 100644
> --- a/net/ieee802154/nl_policy.c
> +++ b/net/ieee802154/nl_policy.c
> @@ -27,6 +27,7 @@ const struct nla_policy ieee802154_policy[IEEE802154_ATTR_MAX + 1] = {
>   	[IEEE802154_ATTR_BAT_EXT] = { .type = NLA_U8, },
>   	[IEEE802154_ATTR_COORD_REALIGN] = { .type = NLA_U8, },
>   	[IEEE802154_ATTR_PAGE] = { .type = NLA_U8, },
> +	[IEEE802154_ATTR_DEV_TYPE] = { .type = NLA_U8, },
>   	[IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, },
>   	[IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, },
>   	[IEEE802154_ATTR_COORD_PAN_ID] = { .type = NLA_U16, },
> 

The reason to split this off from the patch before is to have the Fixes 
tag differently to point to its origin?

Might be a bit to much work for this little subsystem, but you did it 
already, so:


Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

regards
Stefan Schmidt
Jakub Kicinski March 3, 2020, 5:55 p.m. UTC | #2
On Tue, 3 Mar 2020 16:39:55 +0100 Stefan Schmidt wrote:
> On 03.03.20 06:05, Jakub Kicinski wrote:
> > Add missing attribute type validation for IEEE802154_ATTR_DEV_TYPE
> > to the netlink policy.
> > 
> > Fixes: 90c049b2c6ae ("ieee802154: interface type to be added")
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>

> > diff --git a/net/ieee802154/nl_policy.c b/net/ieee802154/nl_policy.c
> > index 824e7e84014c..0672b2f01586 100644
> > --- a/net/ieee802154/nl_policy.c
> > +++ b/net/ieee802154/nl_policy.c
> > @@ -27,6 +27,7 @@ const struct nla_policy ieee802154_policy[IEEE802154_ATTR_MAX + 1] = {
> >   	[IEEE802154_ATTR_BAT_EXT] = { .type = NLA_U8, },
> >   	[IEEE802154_ATTR_COORD_REALIGN] = { .type = NLA_U8, },
> >   	[IEEE802154_ATTR_PAGE] = { .type = NLA_U8, },
> > +	[IEEE802154_ATTR_DEV_TYPE] = { .type = NLA_U8, },
> >   	[IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, },
> >   	[IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, },
> >   	[IEEE802154_ATTR_COORD_PAN_ID] = { .type = NLA_U16, },
> >   
> 
> The reason to split this off from the patch before is to have the Fixes 
> tag differently to point to its origin?

Yup, plus they should hopefully be in chronological order to avoid
conflicts :)

> Might be a bit to much work for this little subsystem, but you did it 
> already, so:
> 
> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

Thanks!
diff mbox series

Patch

diff --git a/net/ieee802154/nl_policy.c b/net/ieee802154/nl_policy.c
index 824e7e84014c..0672b2f01586 100644
--- a/net/ieee802154/nl_policy.c
+++ b/net/ieee802154/nl_policy.c
@@ -27,6 +27,7 @@  const struct nla_policy ieee802154_policy[IEEE802154_ATTR_MAX + 1] = {
 	[IEEE802154_ATTR_BAT_EXT] = { .type = NLA_U8, },
 	[IEEE802154_ATTR_COORD_REALIGN] = { .type = NLA_U8, },
 	[IEEE802154_ATTR_PAGE] = { .type = NLA_U8, },
+	[IEEE802154_ATTR_DEV_TYPE] = { .type = NLA_U8, },
 	[IEEE802154_ATTR_COORD_SHORT_ADDR] = { .type = NLA_U16, },
 	[IEEE802154_ATTR_COORD_HW_ADDR] = { .type = NLA_HW_ADDR, },
 	[IEEE802154_ATTR_COORD_PAN_ID] = { .type = NLA_U16, },