diff options
author | Patrick McHardy <kaber@trash.net> | 2005-06-28 15:54:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-28 15:54:43 -0400 |
commit | b3563c4fbff906991a1b4ef4609f99cca2a0de6a (patch) | |
tree | e5c0e4cb4a0a48ebeeb8b1515128c115c5aa528c /net | |
parent | 4095ebf1e641b0f37ee1cd04c903bb85cf4ed25b (diff) |
[NETLINK]: Clear padding in netlink messages
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e013d836a7ab..879237c378f8 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -126,6 +126,7 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data | |||
126 | rta->rta_type = attrtype; | 126 | rta->rta_type = attrtype; |
127 | rta->rta_len = size; | 127 | rta->rta_len = size; |
128 | memcpy(RTA_DATA(rta), data, attrlen); | 128 | memcpy(RTA_DATA(rta), data, attrlen); |
129 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
129 | } | 130 | } |
130 | 131 | ||
131 | size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) | 132 | size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) |