Skip to content

Commit 18baf0e

Browse files
NicolasDichtelgregkh
authored andcommitted
rtnl: fix msg size calculation in if_nlmsg_size()
[ Upstream commit c57c7a9 ] Size of the attribute IFLA_PHYS_PORT_NAME was missing. Fixes: db24a90 ("net: add support for phys_port_name") CC: David Ahern <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Acked-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent df371b1 commit 18baf0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/rtnetlink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
905905
+ rtnl_link_get_af_size(dev, ext_filter_mask) /* IFLA_AF_SPEC */
906906
+ nla_total_size(MAX_PHYS_ITEM_ID_LEN) /* IFLA_PHYS_PORT_ID */
907907
+ nla_total_size(MAX_PHYS_ITEM_ID_LEN) /* IFLA_PHYS_SWITCH_ID */
908+
+ nla_total_size(IFNAMSIZ) /* IFLA_PHYS_PORT_NAME */
908909
+ nla_total_size(1); /* IFLA_PROTO_DOWN */
909910

910911
}

0 commit comments

Comments
 (0)