• Thomas Graf's avatar
    [NETLINK]: Improve string attribute validation · a5531a5d
    Thomas Graf authored
    Introduces a new attribute type NLA_NUL_STRING to support NUL
    terminated strings. Attributes of this kind require to carry
    a terminating NUL within the maximum specified in the policy.
    
    The `old' NLA_STRING which is not required to be NUL terminated
    is extended to provide means to specify a maximum length of the
    string.
    
    Aims at easing the pain with using nla_strlcpy() on temporary
    buffers.
    Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a5531a5d
attr.c 10.4 KB