• David Ahern's avatar
    rtnetlink: Add more extack messages to rtnl_newlink · 68d57f3b
    David Ahern authored
    Add extack arg to the nla_parse_nested calls in rtnl_newlink, and
    add messages for unknown device type and link network namespace id.
    In particular, it improves the failure message when the wrong link
    type is used. From
        $ ip li add bond1 type bonding
        RTNETLINK answers: Operation not supported
    to
        $ ip li add bond1 type bonding
        Error: Unknown device type.
    
    (The module name is bonding but the link type is bond.)
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    68d57f3b
rtnetlink.c 122 KB