diff options
author | Patrick McHardy <kaber@trash.net> | 2005-06-28 15:56:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-28 15:56:45 -0400 |
commit | 8a47077a0b5aa2649751c46e7a27884e6686ccbf (patch) | |
tree | 60e7c40a375057a31b5340226cd446ffa199413c | |
parent | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 (diff) |
[NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/pkt_cls.h | 1 | ||||
-rw-r--r-- | include/linux/pkt_sched.h | 9 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 5 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 3 | ||||
-rw-r--r-- | net/sched/cls_rsvp.h | 1 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 1 |
6 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 25d2d67c1faf..bd2c5a2bbbf5 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -276,6 +276,7 @@ struct tc_rsvp_pinfo | |||
276 | __u8 protocol; | 276 | __u8 protocol; |
277 | __u8 tunnelid; | 277 | __u8 tunnelid; |
278 | __u8 tunnelhdr; | 278 | __u8 tunnelhdr; |
279 | __u8 pad; | ||
279 | }; | 280 | }; |
280 | 281 | ||
281 | /* ROUTE filter */ | 282 | /* ROUTE filter */ |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 1d9da36eb9db..60ffcb9c5791 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -221,9 +221,11 @@ struct tc_gred_qopt | |||
221 | /* gred setup */ | 221 | /* gred setup */ |
222 | struct tc_gred_sopt | 222 | struct tc_gred_sopt |
223 | { | 223 | { |
224 | __u32 DPs; | 224 | __u32 DPs; |
225 | __u32 def_DP; | 225 | __u32 def_DP; |
226 | __u8 grio; | 226 | __u8 grio; |
227 | __u8 pad1; | ||
228 | __u16 pad2; | ||
227 | }; | 229 | }; |
228 | 230 | ||
229 | /* HTB section */ | 231 | /* HTB section */ |
@@ -351,6 +353,7 @@ struct tc_cbq_ovl | |||
351 | #define TC_CBQ_OVL_DROP 3 | 353 | #define TC_CBQ_OVL_DROP 3 |
352 | #define TC_CBQ_OVL_RCLASSIC 4 | 354 | #define TC_CBQ_OVL_RCLASSIC 4 |
353 | unsigned char priority2; | 355 | unsigned char priority2; |
356 | __u16 pad; | ||
354 | __u32 penalty; | 357 | __u32 penalty; |
355 | }; | 358 | }; |
356 | 359 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index dc26e82ba0fd..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 |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8140bed78a26..1b2902d8eb98 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3031,9 +3031,12 @@ static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, | |||
3031 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); | 3031 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); |
3032 | pmsg = NLMSG_DATA(nlh); | 3032 | pmsg = NLMSG_DATA(nlh); |
3033 | pmsg->prefix_family = AF_INET6; | 3033 | pmsg->prefix_family = AF_INET6; |
3034 | pmsg->prefix_pad1 = 0; | ||
3035 | pmsg->prefix_pad2 = 0; | ||
3034 | pmsg->prefix_ifindex = idev->dev->ifindex; | 3036 | pmsg->prefix_ifindex = idev->dev->ifindex; |
3035 | pmsg->prefix_len = pinfo->prefix_len; | 3037 | pmsg->prefix_len = pinfo->prefix_len; |
3036 | pmsg->prefix_type = pinfo->type; | 3038 | pmsg->prefix_type = pinfo->type; |
3039 | pmsg->prefix_pad3 = 0; | ||
3037 | 3040 | ||
3038 | pmsg->prefix_flags = 0; | 3041 | pmsg->prefix_flags = 0; |
3039 | if (pinfo->onlink) | 3042 | if (pinfo->onlink) |
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 232fb9196810..006168d69376 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -618,6 +618,7 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, | |||
618 | pinfo.protocol = s->protocol; | 618 | pinfo.protocol = s->protocol; |
619 | pinfo.tunnelid = s->tunnelid; | 619 | pinfo.tunnelid = s->tunnelid; |
620 | pinfo.tunnelhdr = f->tunnelhdr; | 620 | pinfo.tunnelhdr = f->tunnelhdr; |
621 | pinfo.pad = 0; | ||
621 | RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); | 622 | RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); |
622 | if (f->res.classid) | 623 | if (f->res.classid) |
623 | RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid); | 624 | RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid); |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index baeb3111f75e..09453f997d8c 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1528,6 +1528,7 @@ static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl) | |||
1528 | 1528 | ||
1529 | opt.strategy = cl->ovl_strategy; | 1529 | opt.strategy = cl->ovl_strategy; |
1530 | opt.priority2 = cl->priority2+1; | 1530 | opt.priority2 = cl->priority2+1; |
1531 | opt.pad = 0; | ||
1531 | opt.penalty = (cl->penalty*1000)/HZ; | 1532 | opt.penalty = (cl->penalty*1000)/HZ; |
1532 | RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); | 1533 | RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); |
1533 | return skb->len; | 1534 | return skb->len; |