Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c57c7a95 authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller
Browse files

rtnl: fix msg size calculation in if_nlmsg_size()



Size of the attribute IFLA_PHYS_PORT_NAME was missing.

Fixes: db24a904 ("net: add support for phys_port_name")
CC: David Ahern <dsahern@gmail.com>
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32867fcc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -909,6 +909,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
	       + rtnl_link_get_af_size(dev, ext_filter_mask) /* IFLA_AF_SPEC */
	       + nla_total_size(MAX_PHYS_ITEM_ID_LEN) /* IFLA_PHYS_PORT_ID */
	       + nla_total_size(MAX_PHYS_ITEM_ID_LEN) /* IFLA_PHYS_SWITCH_ID */
	       + nla_total_size(IFNAMSIZ) /* IFLA_PHYS_PORT_NAME */
	       + nla_total_size(1); /* IFLA_PROTO_DOWN */

}