attr: Add nla_nest_cancel() to remove partially added nested attributes

Signed-off-by: Thomas Graf <tgraf@suug.ch>
attr: Do not enforce maximum length for NLA_FLAG attributes

Although wasteful, NLA_FLAG with non zero payload cause no harm
and should thus not be rejected.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
attr: No longer warn about attribute of type 0

The kernel will start using type 0 attributes for padding purposes.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
attr: Warn application if nla_parse() observes same attribute multiple times

Use a debugging message to warn applications if an attribute is
found multiple times in the same message. It is perfectly valid
to rely on this behaviour but it is likely to indicate a bug.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
msg: Pretty print padding attributes in nl_msg_dump()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
msg: Pretty print error message header even if incomplete

Signed-off-by: Thomas Graf <tgraf@suug.ch>