Commit 8a47077a authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETLINK]: Missing padding fields in dumped structures

Plug holes with padding fields and initialized them to zero.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9ef1d4c7
...@@ -276,6 +276,7 @@ struct tc_rsvp_pinfo ...@@ -276,6 +276,7 @@ struct tc_rsvp_pinfo
__u8 protocol; __u8 protocol;
__u8 tunnelid; __u8 tunnelid;
__u8 tunnelhdr; __u8 tunnelhdr;
__u8 pad;
}; };
/* ROUTE filter */ /* ROUTE filter */
......
...@@ -221,9 +221,11 @@ struct tc_gred_qopt ...@@ -221,9 +221,11 @@ struct tc_gred_qopt
/* gred setup */ /* gred setup */
struct tc_gred_sopt struct tc_gred_sopt
{ {
__u32 DPs; __u32 DPs;
__u32 def_DP; __u32 def_DP;
__u8 grio; __u8 grio;
__u8 pad1;
__u16 pad2;
}; };
/* HTB section */ /* HTB section */
...@@ -351,6 +353,7 @@ struct tc_cbq_ovl ...@@ -351,6 +353,7 @@ struct tc_cbq_ovl
#define TC_CBQ_OVL_DROP 3 #define TC_CBQ_OVL_DROP 3
#define TC_CBQ_OVL_RCLASSIC 4 #define TC_CBQ_OVL_RCLASSIC 4
unsigned char priority2; unsigned char priority2;
__u16 pad;
__u32 penalty; __u32 penalty;
}; };
......
...@@ -363,6 +363,8 @@ enum ...@@ -363,6 +363,8 @@ enum
struct rta_session struct rta_session
{ {
__u8 proto; __u8 proto;
__u8 pad1;
__u16 pad2;
union { union {
struct { struct {
...@@ -635,10 +637,13 @@ struct ifinfomsg ...@@ -635,10 +637,13 @@ struct ifinfomsg
struct prefixmsg struct prefixmsg
{ {
unsigned char prefix_family; unsigned char prefix_family;
unsigned char prefix_pad1;
unsigned short prefix_pad2;
int prefix_ifindex; int prefix_ifindex;
unsigned char prefix_type; unsigned char prefix_type;
unsigned char prefix_len; unsigned char prefix_len;
unsigned char prefix_flags; unsigned char prefix_flags;
unsigned char prefix_pad3;
}; };
enum enum
......
...@@ -3031,9 +3031,12 @@ static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, ...@@ -3031,9 +3031,12 @@ static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags); nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags);
pmsg = NLMSG_DATA(nlh); pmsg = NLMSG_DATA(nlh);
pmsg->prefix_family = AF_INET6; pmsg->prefix_family = AF_INET6;
pmsg->prefix_pad1 = 0;
pmsg->prefix_pad2 = 0;
pmsg->prefix_ifindex = idev->dev->ifindex; pmsg->prefix_ifindex = idev->dev->ifindex;
pmsg->prefix_len = pinfo->prefix_len; pmsg->prefix_len = pinfo->prefix_len;
pmsg->prefix_type = pinfo->type; pmsg->prefix_type = pinfo->type;
pmsg->prefix_pad3 = 0;
pmsg->prefix_flags = 0; pmsg->prefix_flags = 0;
if (pinfo->onlink) if (pinfo->onlink)
......
...@@ -618,6 +618,7 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -618,6 +618,7 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh,
pinfo.protocol = s->protocol; pinfo.protocol = s->protocol;
pinfo.tunnelid = s->tunnelid; pinfo.tunnelid = s->tunnelid;
pinfo.tunnelhdr = f->tunnelhdr; pinfo.tunnelhdr = f->tunnelhdr;
pinfo.pad = 0;
RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo); RTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo);
if (f->res.classid) if (f->res.classid)
RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid); RTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid);
......
...@@ -1528,6 +1528,7 @@ static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl) ...@@ -1528,6 +1528,7 @@ static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl)
opt.strategy = cl->ovl_strategy; opt.strategy = cl->ovl_strategy;
opt.priority2 = cl->priority2+1; opt.priority2 = cl->priority2+1;
opt.pad = 0;
opt.penalty = (cl->penalty*1000)/HZ; opt.penalty = (cl->penalty*1000)/HZ;
RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt);
return skb->len; return skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment