aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-06-28 15:56:45 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-28 15:56:45 -0400
commit8a47077a0b5aa2649751c46e7a27884e6686ccbf (patch)
tree60e7c40a375057a31b5340226cd446ffa199413c /net
parent9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 (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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/addrconf.c3
-rw-r--r--net/sched/cls_rsvp.h1
-rw-r--r--net/sched/sch_cbq.c1
3 files changed, 5 insertions, 0 deletions
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;