[NETLINK]: Clear padding in netlink messages
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4095ebf1e6
commit
b3563c4fbf
@ -126,6 +126,7 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data
|
||||
rta->rta_type = attrtype;
|
||||
rta->rta_len = size;
|
||||
memcpy(RTA_DATA(rta), data, attrlen);
|
||||
memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
|
||||
}
|
||||
|
||||
size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size)
|
||||
|
Reference in New Issue
Block a user