diff options
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r-- | include/linux/rtnetlink.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d021888b58f1..dc26e82ba0fd 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -898,7 +898,9 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
898 | memcpy(skb_put(skb, attrlen), data, attrlen); }) | 898 | memcpy(skb_put(skb, attrlen), data, attrlen); }) |
899 | 899 | ||
900 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | 900 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ |
901 | RTA_APPEND(skb, RTA_ALIGN(attrlen), data) | 901 | ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \ |
902 | memset(skb->tail - (RTA_ALIGN(attrlen) - attrlen), 0, \ | ||
903 | RTA_ALIGN(attrlen) - attrlen); }) | ||
902 | 904 | ||
903 | #define RTA_PUT_U8(skb, attrtype, value) \ | 905 | #define RTA_PUT_U8(skb, attrtype, value) \ |
904 | ({ u8 _tmp = (value); \ | 906 | ({ u8 _tmp = (value); \ |
@@ -978,6 +980,7 @@ __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) | |||
978 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); | 980 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); |
979 | rta->rta_type = attrtype; | 981 | rta->rta_type = attrtype; |
980 | rta->rta_len = size; | 982 | rta->rta_len = size; |
983 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
981 | return rta; | 984 | return rta; |
982 | } | 985 | } |
983 | 986 | ||