From 80816d12bec890e6ad6201b774d3143b7f1980a7 Mon Sep 17 00:00:00 2001 From: Sean Tranchetti Date: Wed, 2 Dec 2020 15:15:40 -0800 Subject: [PATCH] rmnet_core: Set proper maxtype element for NL attributes maxtype should be set to the value of the highest attribute type that is valid, not the number of valid attributes accepted. This ensures that attributes with types higher than this number are ignored properly. Change-Id: Ife53a4a9a7327a8d89e709320eb1c6cb50992922 Signed-off-by: Sean Tranchetti --- core/rmnet_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rmnet_config.c b/core/rmnet_config.c index 5d1a0c34b7..7a087e8645 100644 --- a/core/rmnet_config.c +++ b/core/rmnet_config.c @@ -517,7 +517,7 @@ nla_put_failure: struct rtnl_link_ops rmnet_link_ops __read_mostly = { .kind = "rmnet", - .maxtype = __IFLA_RMNET_EXT_MAX, + .maxtype = __IFLA_RMNET_EXT_MAX - 1, .priv_size = sizeof(struct rmnet_priv), .setup = rmnet_vnd_setup, .validate = rmnet_rtnl_validate,