lkml.org 
[lkml]   [2016]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 072/137] rtnl: fix msg size calculation in if_nlmsg_size()
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

    [ Upstream commit c57c7a95da842807b475b823ed2e5435c42cb3b0 ]

    Size of the attribute IFLA_PHYS_PORT_NAME was missing.

    Fixes: db24a9044ee1 ("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>
    ---
    net/core/rtnetlink.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/core/rtnetlink.c
    +++ b/net/core/rtnetlink.c
    @@ -905,6 +905,7 @@ static noinline size_t if_nlmsg_size(con
    + 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 */

    }

    \
     
     \ /
      Last update: 2016-04-18 05:21    [W:3.525 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site