diff options
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e013d836a7..4b1bb30e63 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) |
@@ -188,6 +189,7 @@ static int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
188 | nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); | 189 | nlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags); |
189 | r = NLMSG_DATA(nlh); | 190 | r = NLMSG_DATA(nlh); |
190 | r->ifi_family = AF_UNSPEC; | 191 | r->ifi_family = AF_UNSPEC; |
192 | r->__ifi_pad = 0; | ||
191 | r->ifi_type = dev->type; | 193 | r->ifi_type = dev->type; |
192 | r->ifi_index = dev->ifindex; | 194 | r->ifi_index = dev->ifindex; |
193 | r->ifi_flags = dev_get_flags(dev); | 195 | r->ifi_flags = dev_get_flags(dev); |