[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>

authored by Patrick McHardy and committed by David S. Miller 8a47077a 9ef1d4c7

+17 -3
+1
include/linux/pkt_cls.h
··· 276 __u8 protocol; 277 __u8 tunnelid; 278 __u8 tunnelhdr; 279 }; 280 281 /* ROUTE filter */
··· 276 __u8 protocol; 277 __u8 tunnelid; 278 __u8 tunnelhdr; 279 + __u8 pad; 280 }; 281 282 /* ROUTE filter */
+6 -3
include/linux/pkt_sched.h
··· 221 /* gred setup */ 222 struct tc_gred_sopt 223 { 224 - __u32 DPs; 225 - __u32 def_DP; 226 - __u8 grio; 227 }; 228 229 /* HTB section */ ··· 353 #define TC_CBQ_OVL_DROP 3 354 #define TC_CBQ_OVL_RCLASSIC 4 355 unsigned char priority2; 356 __u32 penalty; 357 }; 358
··· 221 /* gred setup */ 222 struct tc_gred_sopt 223 { 224 + __u32 DPs; 225 + __u32 def_DP; 226 + __u8 grio; 227 + __u8 pad1; 228 + __u16 pad2; 229 }; 230 231 /* HTB section */ ··· 351 #define TC_CBQ_OVL_DROP 3 352 #define TC_CBQ_OVL_RCLASSIC 4 353 unsigned char priority2; 354 + __u16 pad; 355 __u32 penalty; 356 }; 357
+5
include/linux/rtnetlink.h
··· 363 struct rta_session 364 { 365 __u8 proto; 366 367 union { 368 struct { ··· 637 struct prefixmsg 638 { 639 unsigned char prefix_family; 640 int prefix_ifindex; 641 unsigned char prefix_type; 642 unsigned char prefix_len; 643 unsigned char prefix_flags; 644 }; 645 646 enum
··· 363 struct rta_session 364 { 365 __u8 proto; 366 + __u8 pad1; 367 + __u16 pad2; 368 369 union { 370 struct { ··· 635 struct prefixmsg 636 { 637 unsigned char prefix_family; 638 + unsigned char prefix_pad1; 639 + unsigned short prefix_pad2; 640 int prefix_ifindex; 641 unsigned char prefix_type; 642 unsigned char prefix_len; 643 unsigned char prefix_flags; 644 + unsigned char prefix_pad3; 645 }; 646 647 enum
+3
net/ipv6/addrconf.c
··· 3031 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); 3032 pmsg = NLMSG_DATA(nlh); 3033 pmsg->prefix_family = AF_INET6; 3034 pmsg->prefix_ifindex = idev->dev->ifindex; 3035 pmsg->prefix_len = pinfo->prefix_len; 3036 pmsg->prefix_type = pinfo->type; 3037 3038 pmsg->prefix_flags = 0; 3039 if (pinfo->onlink)
··· 3031 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); 3032 pmsg = NLMSG_DATA(nlh); 3033 pmsg->prefix_family = AF_INET6; 3034 + pmsg->prefix_pad1 = 0; 3035 + pmsg->prefix_pad2 = 0; 3036 pmsg->prefix_ifindex = idev->dev->ifindex; 3037 pmsg->prefix_len = pinfo->prefix_len; 3038 pmsg->prefix_type = pinfo->type; 3039 + pmsg->prefix_pad3 = 0; 3040 3041 pmsg->prefix_flags = 0; 3042 if (pinfo->onlink)
+1
net/sched/cls_rsvp.h
··· 618 pinfo.protocol = s->protocol; 619 pinfo.tunnelid = s->tunnelid; 620 pinfo.tunnelhdr = f->tunnelhdr; 621 RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); 622 if (f->res.classid) 623 RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid);
··· 618 pinfo.protocol = s->protocol; 619 pinfo.tunnelid = s->tunnelid; 620 pinfo.tunnelhdr = f->tunnelhdr; 621 + pinfo.pad = 0; 622 RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); 623 if (f->res.classid) 624 RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid);
+1
net/sched/sch_cbq.c
··· 1528 1529 opt.strategy = cl->ovl_strategy; 1530 opt.priority2 = cl->priority2+1; 1531 opt.penalty = (cl->penalty*1000)/HZ; 1532 RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); 1533 return skb->len;
··· 1528 1529 opt.strategy = cl->ovl_strategy; 1530 opt.priority2 = cl->priority2+1; 1531 + opt.pad = 0; 1532 opt.penalty = (cl->penalty*1000)/HZ; 1533 RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); 1534 return skb->len;