]> err.no Git - linux-2.6/blobdiff - net/core/rtnetlink.c
[NETLINK]: Clear padding in netlink messages
[linux-2.6] / net / core / rtnetlink.c
index e013d836a7abc3592d5fa5db0f24aca874095f52..879237c378f8e8df85580d250d191531c250861f 100644 (file)
@@ -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)