diff options
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r-- | include/linux/rtnetlink.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d021888b58f1..657c05ab8f9e 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -363,6 +363,8 @@ enum | |||
363 | struct rta_session | 363 | struct rta_session |
364 | { | 364 | { |
365 | __u8 proto; | 365 | __u8 proto; |
366 | __u8 pad1; | ||
367 | __u16 pad2; | ||
366 | 368 | ||
367 | union { | 369 | union { |
368 | struct { | 370 | struct { |
@@ -635,10 +637,13 @@ struct ifinfomsg | |||
635 | struct prefixmsg | 637 | struct prefixmsg |
636 | { | 638 | { |
637 | unsigned char prefix_family; | 639 | unsigned char prefix_family; |
640 | unsigned char prefix_pad1; | ||
641 | unsigned short prefix_pad2; | ||
638 | int prefix_ifindex; | 642 | int prefix_ifindex; |
639 | unsigned char prefix_type; | 643 | unsigned char prefix_type; |
640 | unsigned char prefix_len; | 644 | unsigned char prefix_len; |
641 | unsigned char prefix_flags; | 645 | unsigned char prefix_flags; |
646 | unsigned char prefix_pad3; | ||
642 | }; | 647 | }; |
643 | 648 | ||
644 | enum | 649 | enum |
@@ -898,7 +903,9 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
898 | memcpy(skb_put(skb, attrlen), data, attrlen); }) | 903 | memcpy(skb_put(skb, attrlen), data, attrlen); }) |
899 | 904 | ||
900 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | 905 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ |
901 | RTA_APPEND(skb, RTA_ALIGN(attrlen), data) | 906 | ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \ |
907 | memset(skb->tail - (RTA_ALIGN(attrlen) - attrlen), 0, \ | ||
908 | RTA_ALIGN(attrlen) - attrlen); }) | ||
902 | 909 | ||
903 | #define RTA_PUT_U8(skb, attrtype, value) \ | 910 | #define RTA_PUT_U8(skb, attrtype, value) \ |
904 | ({ u8 _tmp = (value); \ | 911 | ({ u8 _tmp = (value); \ |
@@ -978,6 +985,7 @@ __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) | |||
978 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); | 985 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); |
979 | rta->rta_type = attrtype; | 986 | rta->rta_type = attrtype; |
980 | rta->rta_len = size; | 987 | rta->rta_len = size; |
988 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
981 | return rta; | 989 | return rta; |
982 | } | 990 | } |
983 | 991 | ||