mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
rtnl: fix msg size calculation in if_nlmsg_size()
[ Upstream commitc57c7a95da] Size of the attribute IFLA_PHYS_PORT_NAME was missing. Fixes:db24a9044e("net: add support for phys_port_name") CC: David Ahern <dsahern@gmail.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
df371b1963
commit
18baf0e01e
@@ -905,6 +905,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 */
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user