diff options
author | Patrick McHardy <kaber@trash.net> | 2005-06-28 15:55:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-28 15:55:30 -0400 |
commit | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 (patch) | |
tree | a2465b3bf0f4c3bdd1f759d8a90cf8f8db06900a /net/sched | |
parent | b3563c4fbff906991a1b4ef4609f99cca2a0de6a (diff) |
[NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_api.c | 10 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 2 |
4 files changed, 15 insertions, 1 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 9594206e6035..249c61936ea0 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -439,6 +439,8 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | |||
439 | 439 | ||
440 | t = NLMSG_DATA(nlh); | 440 | t = NLMSG_DATA(nlh); |
441 | t->tca_family = AF_UNSPEC; | 441 | t->tca_family = AF_UNSPEC; |
442 | t->tca__pad1 = 0; | ||
443 | t->tca__pad2 = 0; | ||
442 | 444 | ||
443 | x = (struct rtattr*) skb->tail; | 445 | x = (struct rtattr*) skb->tail; |
444 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 446 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
@@ -580,6 +582,8 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) | |||
580 | nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t)); | 582 | nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t)); |
581 | t = NLMSG_DATA(nlh); | 583 | t = NLMSG_DATA(nlh); |
582 | t->tca_family = AF_UNSPEC; | 584 | t->tca_family = AF_UNSPEC; |
585 | t->tca__pad1 = 0; | ||
586 | t->tca__pad2 = 0; | ||
583 | 587 | ||
584 | x = (struct rtattr *) skb->tail; | 588 | x = (struct rtattr *) skb->tail; |
585 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 589 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
@@ -687,7 +691,9 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
687 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); | 691 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); |
688 | t = NLMSG_DATA(nlh); | 692 | t = NLMSG_DATA(nlh); |
689 | t->tca_family = AF_UNSPEC; | 693 | t->tca_family = AF_UNSPEC; |
690 | 694 | t->tca__pad1 = 0; | |
695 | t->tca__pad2 = 0; | ||
696 | |||
691 | x = (struct rtattr*) skb->tail; | 697 | x = (struct rtattr*) skb->tail; |
692 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 698 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
693 | 699 | ||
@@ -842,6 +848,8 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) | |||
842 | cb->nlh->nlmsg_type, sizeof(*t)); | 848 | cb->nlh->nlmsg_type, sizeof(*t)); |
843 | t = NLMSG_DATA(nlh); | 849 | t = NLMSG_DATA(nlh); |
844 | t->tca_family = AF_UNSPEC; | 850 | t->tca_family = AF_UNSPEC; |
851 | t->tca__pad1 = 0; | ||
852 | t->tca__pad2 = 0; | ||
845 | 853 | ||
846 | x = (struct rtattr *) skb->tail; | 854 | x = (struct rtattr *) skb->tail; |
847 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 855 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1616bf5c9627..3b5714ef4d1a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -331,6 +331,8 @@ tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, | |||
331 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 331 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
332 | tcm = NLMSG_DATA(nlh); | 332 | tcm = NLMSG_DATA(nlh); |
333 | tcm->tcm_family = AF_UNSPEC; | 333 | tcm->tcm_family = AF_UNSPEC; |
334 | tcm->tcm__pad1 = 0; | ||
335 | tcm->tcm__pad1 = 0; | ||
334 | tcm->tcm_ifindex = tp->q->dev->ifindex; | 336 | tcm->tcm_ifindex = tp->q->dev->ifindex; |
335 | tcm->tcm_parent = tp->classid; | 337 | tcm->tcm_parent = tp->classid; |
336 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); | 338 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 97c1c75d5c78..05e6e0a799da 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -770,6 +770,8 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
770 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 770 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
771 | tcm = NLMSG_DATA(nlh); | 771 | tcm = NLMSG_DATA(nlh); |
772 | tcm->tcm_family = AF_UNSPEC; | 772 | tcm->tcm_family = AF_UNSPEC; |
773 | tcm->tcm__pad1 = 0; | ||
774 | tcm->tcm__pad2 = 0; | ||
773 | tcm->tcm_ifindex = q->dev->ifindex; | 775 | tcm->tcm_ifindex = q->dev->ifindex; |
774 | tcm->tcm_parent = clid; | 776 | tcm->tcm_parent = clid; |
775 | tcm->tcm_handle = q->handle; | 777 | tcm->tcm_handle = q->handle; |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index d43e3b8cbf6a..baeb3111f75e 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1563,6 +1563,8 @@ static __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl) | |||
1563 | 1563 | ||
1564 | if (cl->police) { | 1564 | if (cl->police) { |
1565 | opt.police = cl->police; | 1565 | opt.police = cl->police; |
1566 | opt.__res1 = 0; | ||
1567 | opt.__res2 = 0; | ||
1566 | RTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); | 1568 | RTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); |
1567 | } | 1569 | } |
1568 | return skb->len; | 1570 | return skb->len; |