diff options
author | David S. Miller <davem@davemloft.net> | 2010-08-22 02:32:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-22 02:32:24 -0400 |
commit | d3c6e7ad09cebbad1a3dea077668062136626fd2 (patch) | |
tree | 698022508a8d8c76a5d2cf55e50232079d6b1f42 /net | |
parent | c3227e546c574172e77616270a16a04eae561b8f (diff) | |
parent | 48d3ff82698cb0094684aed70446e0a5cbb1a4d0 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan_dev.c | 3 | ||||
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 | ||||
-rw-r--r-- | net/irda/irlan/irlan_eth.c | 4 | ||||
-rw-r--r-- | net/netlink/af_netlink.c | 46 | ||||
-rw-r--r-- | net/rds/recv.c | 2 | ||||
-rw-r--r-- | net/sched/act_gact.c | 21 | ||||
-rw-r--r-- | net/sched/act_mirred.c | 15 | ||||
-rw-r--r-- | net/sched/act_nat.c | 22 | ||||
-rw-r--r-- | net/sched/act_simple.c | 11 | ||||
-rw-r--r-- | net/sched/act_skbedit.c | 11 |
13 files changed, 72 insertions, 71 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 3d59c9bf8feb..3bccdd12a264 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -510,7 +510,8 @@ static int vlan_dev_open(struct net_device *dev) | |||
510 | if (vlan->flags & VLAN_FLAG_GVRP) | 510 | if (vlan->flags & VLAN_FLAG_GVRP) |
511 | vlan_gvrp_request_join(dev); | 511 | vlan_gvrp_request_join(dev); |
512 | 512 | ||
513 | netif_carrier_on(dev); | 513 | if (netif_carrier_ok(real_dev)) |
514 | netif_carrier_on(dev); | ||
514 | return 0; | 515 | return 0; |
515 | 516 | ||
516 | clear_allmulti: | 517 | clear_allmulti: |
diff --git a/net/core/dev.c b/net/core/dev.c index 4d74d26b8e1a..7cd5237d9822 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3156,7 +3156,7 @@ pull: | |||
3156 | put_page(skb_shinfo(skb)->frags[0].page); | 3156 | put_page(skb_shinfo(skb)->frags[0].page); |
3157 | memmove(skb_shinfo(skb)->frags, | 3157 | memmove(skb_shinfo(skb)->frags, |
3158 | skb_shinfo(skb)->frags + 1, | 3158 | skb_shinfo(skb)->frags + 1, |
3159 | --skb_shinfo(skb)->nr_frags); | 3159 | --skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t)); |
3160 | } | 3160 | } |
3161 | } | 3161 | } |
3162 | 3162 | ||
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 6bccba31d132..51d6c3167975 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -735,6 +735,7 @@ static void get_counters(const struct xt_table_info *t, | |||
735 | if (cpu == curcpu) | 735 | if (cpu == curcpu) |
736 | continue; | 736 | continue; |
737 | i = 0; | 737 | i = 0; |
738 | local_bh_disable(); | ||
738 | xt_info_wrlock(cpu); | 739 | xt_info_wrlock(cpu); |
739 | xt_entry_foreach(iter, t->entries[cpu], t->size) { | 740 | xt_entry_foreach(iter, t->entries[cpu], t->size) { |
740 | ADD_COUNTER(counters[i], iter->counters.bcnt, | 741 | ADD_COUNTER(counters[i], iter->counters.bcnt, |
@@ -742,6 +743,7 @@ static void get_counters(const struct xt_table_info *t, | |||
742 | ++i; | 743 | ++i; |
743 | } | 744 | } |
744 | xt_info_wrunlock(cpu); | 745 | xt_info_wrunlock(cpu); |
746 | local_bh_enable(); | ||
745 | } | 747 | } |
746 | put_cpu(); | 748 | put_cpu(); |
747 | } | 749 | } |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index c439721b165a..97b64b22c412 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -909,6 +909,7 @@ get_counters(const struct xt_table_info *t, | |||
909 | if (cpu == curcpu) | 909 | if (cpu == curcpu) |
910 | continue; | 910 | continue; |
911 | i = 0; | 911 | i = 0; |
912 | local_bh_disable(); | ||
912 | xt_info_wrlock(cpu); | 913 | xt_info_wrlock(cpu); |
913 | xt_entry_foreach(iter, t->entries[cpu], t->size) { | 914 | xt_entry_foreach(iter, t->entries[cpu], t->size) { |
914 | ADD_COUNTER(counters[i], iter->counters.bcnt, | 915 | ADD_COUNTER(counters[i], iter->counters.bcnt, |
@@ -916,6 +917,7 @@ get_counters(const struct xt_table_info *t, | |||
916 | ++i; /* macro does multi eval of i */ | 917 | ++i; /* macro does multi eval of i */ |
917 | } | 918 | } |
918 | xt_info_wrunlock(cpu); | 919 | xt_info_wrunlock(cpu); |
920 | local_bh_enable(); | ||
919 | } | 921 | } |
920 | put_cpu(); | 922 | put_cpu(); |
921 | } | 923 | } |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 5359ef4daac5..29a7bca29e3f 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -922,6 +922,7 @@ get_counters(const struct xt_table_info *t, | |||
922 | if (cpu == curcpu) | 922 | if (cpu == curcpu) |
923 | continue; | 923 | continue; |
924 | i = 0; | 924 | i = 0; |
925 | local_bh_disable(); | ||
925 | xt_info_wrlock(cpu); | 926 | xt_info_wrlock(cpu); |
926 | xt_entry_foreach(iter, t->entries[cpu], t->size) { | 927 | xt_entry_foreach(iter, t->entries[cpu], t->size) { |
927 | ADD_COUNTER(counters[i], iter->counters.bcnt, | 928 | ADD_COUNTER(counters[i], iter->counters.bcnt, |
@@ -929,6 +930,7 @@ get_counters(const struct xt_table_info *t, | |||
929 | ++i; | 930 | ++i; |
930 | } | 931 | } |
931 | xt_info_wrunlock(cpu); | 932 | xt_info_wrunlock(cpu); |
933 | local_bh_enable(); | ||
932 | } | 934 | } |
933 | put_cpu(); | 935 | put_cpu(); |
934 | } | 936 | } |
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index 9616c32d1076..5bb8353105cc 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c | |||
@@ -169,6 +169,7 @@ static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb, | |||
169 | { | 169 | { |
170 | struct irlan_cb *self = netdev_priv(dev); | 170 | struct irlan_cb *self = netdev_priv(dev); |
171 | int ret; | 171 | int ret; |
172 | unsigned int len; | ||
172 | 173 | ||
173 | /* skb headroom large enough to contain all IrDA-headers? */ | 174 | /* skb headroom large enough to contain all IrDA-headers? */ |
174 | if ((skb_headroom(skb) < self->max_header_size) || (skb_shared(skb))) { | 175 | if ((skb_headroom(skb) < self->max_header_size) || (skb_shared(skb))) { |
@@ -188,6 +189,7 @@ static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb, | |||
188 | 189 | ||
189 | dev->trans_start = jiffies; | 190 | dev->trans_start = jiffies; |
190 | 191 | ||
192 | len = skb->len; | ||
191 | /* Now queue the packet in the transport layer */ | 193 | /* Now queue the packet in the transport layer */ |
192 | if (self->use_udata) | 194 | if (self->use_udata) |
193 | ret = irttp_udata_request(self->tsap_data, skb); | 195 | ret = irttp_udata_request(self->tsap_data, skb); |
@@ -209,7 +211,7 @@ static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb, | |||
209 | self->stats.tx_dropped++; | 211 | self->stats.tx_dropped++; |
210 | } else { | 212 | } else { |
211 | self->stats.tx_packets++; | 213 | self->stats.tx_packets++; |
212 | self->stats.tx_bytes += skb->len; | 214 | self->stats.tx_bytes += len; |
213 | } | 215 | } |
214 | 216 | ||
215 | return NETDEV_TX_OK; | 217 | return NETDEV_TX_OK; |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 8648a9922aab..980fe4ad0016 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1406,7 +1406,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
1406 | struct netlink_sock *nlk = nlk_sk(sk); | 1406 | struct netlink_sock *nlk = nlk_sk(sk); |
1407 | int noblock = flags&MSG_DONTWAIT; | 1407 | int noblock = flags&MSG_DONTWAIT; |
1408 | size_t copied; | 1408 | size_t copied; |
1409 | struct sk_buff *skb, *frag __maybe_unused = NULL; | 1409 | struct sk_buff *skb, *data_skb; |
1410 | int err; | 1410 | int err; |
1411 | 1411 | ||
1412 | if (flags&MSG_OOB) | 1412 | if (flags&MSG_OOB) |
@@ -1418,45 +1418,35 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
1418 | if (skb == NULL) | 1418 | if (skb == NULL) |
1419 | goto out; | 1419 | goto out; |
1420 | 1420 | ||
1421 | data_skb = skb; | ||
1422 | |||
1421 | #ifdef CONFIG_COMPAT_NETLINK_MESSAGES | 1423 | #ifdef CONFIG_COMPAT_NETLINK_MESSAGES |
1422 | if (unlikely(skb_shinfo(skb)->frag_list)) { | 1424 | if (unlikely(skb_shinfo(skb)->frag_list)) { |
1423 | bool need_compat = !!(flags & MSG_CMSG_COMPAT); | ||
1424 | |||
1425 | /* | 1425 | /* |
1426 | * If this skb has a frag_list, then here that means that | 1426 | * If this skb has a frag_list, then here that means that we |
1427 | * we will have to use the frag_list skb for compat tasks | 1427 | * will have to use the frag_list skb's data for compat tasks |
1428 | * and the regular skb for non-compat tasks. | 1428 | * and the regular skb's data for normal (non-compat) tasks. |
1429 | * | 1429 | * |
1430 | * The skb might (and likely will) be cloned, so we can't | 1430 | * If we need to send the compat skb, assign it to the |
1431 | * just reset frag_list and go on with things -- we need to | 1431 | * 'data_skb' variable so that it will be used below for data |
1432 | * keep that. For the compat case that's easy -- simply get | 1432 | * copying. We keep 'skb' for everything else, including |
1433 | * a reference to the compat skb and free the regular one | 1433 | * freeing both later. |
1434 | * including the frag. For the non-compat case, we need to | ||
1435 | * avoid sending the frag to the user -- so assign NULL but | ||
1436 | * restore it below before freeing the skb. | ||
1437 | */ | 1434 | */ |
1438 | if (need_compat) { | 1435 | if (flags & MSG_CMSG_COMPAT) |
1439 | struct sk_buff *compskb = skb_shinfo(skb)->frag_list; | 1436 | data_skb = skb_shinfo(skb)->frag_list; |
1440 | skb_get(compskb); | ||
1441 | kfree_skb(skb); | ||
1442 | skb = compskb; | ||
1443 | } else { | ||
1444 | frag = skb_shinfo(skb)->frag_list; | ||
1445 | skb_shinfo(skb)->frag_list = NULL; | ||
1446 | } | ||
1447 | } | 1437 | } |
1448 | #endif | 1438 | #endif |
1449 | 1439 | ||
1450 | msg->msg_namelen = 0; | 1440 | msg->msg_namelen = 0; |
1451 | 1441 | ||
1452 | copied = skb->len; | 1442 | copied = data_skb->len; |
1453 | if (len < copied) { | 1443 | if (len < copied) { |
1454 | msg->msg_flags |= MSG_TRUNC; | 1444 | msg->msg_flags |= MSG_TRUNC; |
1455 | copied = len; | 1445 | copied = len; |
1456 | } | 1446 | } |
1457 | 1447 | ||
1458 | skb_reset_transport_header(skb); | 1448 | skb_reset_transport_header(data_skb); |
1459 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 1449 | err = skb_copy_datagram_iovec(data_skb, 0, msg->msg_iov, copied); |
1460 | 1450 | ||
1461 | if (msg->msg_name) { | 1451 | if (msg->msg_name) { |
1462 | struct sockaddr_nl *addr = (struct sockaddr_nl *)msg->msg_name; | 1452 | struct sockaddr_nl *addr = (struct sockaddr_nl *)msg->msg_name; |
@@ -1476,11 +1466,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
1476 | } | 1466 | } |
1477 | siocb->scm->creds = *NETLINK_CREDS(skb); | 1467 | siocb->scm->creds = *NETLINK_CREDS(skb); |
1478 | if (flags & MSG_TRUNC) | 1468 | if (flags & MSG_TRUNC) |
1479 | copied = skb->len; | 1469 | copied = data_skb->len; |
1480 | |||
1481 | #ifdef CONFIG_COMPAT_NETLINK_MESSAGES | ||
1482 | skb_shinfo(skb)->frag_list = frag; | ||
1483 | #endif | ||
1484 | 1470 | ||
1485 | skb_free_datagram(sk, skb); | 1471 | skb_free_datagram(sk, skb); |
1486 | 1472 | ||
diff --git a/net/rds/recv.c b/net/rds/recv.c index 795a00b7f2cb..c93588c2d553 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -297,7 +297,7 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc, | |||
297 | int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr) | 297 | int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msghdr) |
298 | { | 298 | { |
299 | struct rds_notifier *notifier; | 299 | struct rds_notifier *notifier; |
300 | struct rds_rdma_notify cmsg; | 300 | struct rds_rdma_notify cmsg = { 0 }; /* fill holes with zero */ |
301 | unsigned int count = 0, max_messages = ~0U; | 301 | unsigned int count = 0, max_messages = ~0U; |
302 | unsigned long flags; | 302 | unsigned long flags; |
303 | LIST_HEAD(copy); | 303 | LIST_HEAD(copy); |
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index 8406c6654990..c2ed90a4c0b4 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c | |||
@@ -152,21 +152,24 @@ static int tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result | |||
152 | static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) | 152 | static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) |
153 | { | 153 | { |
154 | unsigned char *b = skb_tail_pointer(skb); | 154 | unsigned char *b = skb_tail_pointer(skb); |
155 | struct tc_gact opt; | ||
156 | struct tcf_gact *gact = a->priv; | 155 | struct tcf_gact *gact = a->priv; |
156 | struct tc_gact opt = { | ||
157 | .index = gact->tcf_index, | ||
158 | .refcnt = gact->tcf_refcnt - ref, | ||
159 | .bindcnt = gact->tcf_bindcnt - bind, | ||
160 | .action = gact->tcf_action, | ||
161 | }; | ||
157 | struct tcf_t t; | 162 | struct tcf_t t; |
158 | 163 | ||
159 | opt.index = gact->tcf_index; | ||
160 | opt.refcnt = gact->tcf_refcnt - ref; | ||
161 | opt.bindcnt = gact->tcf_bindcnt - bind; | ||
162 | opt.action = gact->tcf_action; | ||
163 | NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); | 164 | NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); |
164 | #ifdef CONFIG_GACT_PROB | 165 | #ifdef CONFIG_GACT_PROB |
165 | if (gact->tcfg_ptype) { | 166 | if (gact->tcfg_ptype) { |
166 | struct tc_gact_p p_opt; | 167 | struct tc_gact_p p_opt = { |
167 | p_opt.paction = gact->tcfg_paction; | 168 | .paction = gact->tcfg_paction, |
168 | p_opt.pval = gact->tcfg_pval; | 169 | .pval = gact->tcfg_pval, |
169 | p_opt.ptype = gact->tcfg_ptype; | 170 | .ptype = gact->tcfg_ptype, |
171 | }; | ||
172 | |||
170 | NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); | 173 | NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); |
171 | } | 174 | } |
172 | #endif | 175 | #endif |
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 11f195af2da0..0c311be92827 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -219,15 +219,16 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i | |||
219 | { | 219 | { |
220 | unsigned char *b = skb_tail_pointer(skb); | 220 | unsigned char *b = skb_tail_pointer(skb); |
221 | struct tcf_mirred *m = a->priv; | 221 | struct tcf_mirred *m = a->priv; |
222 | struct tc_mirred opt; | 222 | struct tc_mirred opt = { |
223 | .index = m->tcf_index, | ||
224 | .action = m->tcf_action, | ||
225 | .refcnt = m->tcf_refcnt - ref, | ||
226 | .bindcnt = m->tcf_bindcnt - bind, | ||
227 | .eaction = m->tcfm_eaction, | ||
228 | .ifindex = m->tcfm_ifindex, | ||
229 | }; | ||
223 | struct tcf_t t; | 230 | struct tcf_t t; |
224 | 231 | ||
225 | opt.index = m->tcf_index; | ||
226 | opt.action = m->tcf_action; | ||
227 | opt.refcnt = m->tcf_refcnt - ref; | ||
228 | opt.bindcnt = m->tcf_bindcnt - bind; | ||
229 | opt.eaction = m->tcfm_eaction; | ||
230 | opt.ifindex = m->tcfm_ifindex; | ||
231 | NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt); | 232 | NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt); |
232 | t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); | 233 | t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install); |
233 | t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); | 234 | t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); |
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c index 509a2d53a99d..186eb837e600 100644 --- a/net/sched/act_nat.c +++ b/net/sched/act_nat.c | |||
@@ -272,19 +272,19 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a, | |||
272 | { | 272 | { |
273 | unsigned char *b = skb_tail_pointer(skb); | 273 | unsigned char *b = skb_tail_pointer(skb); |
274 | struct tcf_nat *p = a->priv; | 274 | struct tcf_nat *p = a->priv; |
275 | struct tc_nat opt; | 275 | struct tc_nat opt = { |
276 | .old_addr = p->old_addr, | ||
277 | .new_addr = p->new_addr, | ||
278 | .mask = p->mask, | ||
279 | .flags = p->flags, | ||
280 | |||
281 | .index = p->tcf_index, | ||
282 | .action = p->tcf_action, | ||
283 | .refcnt = p->tcf_refcnt - ref, | ||
284 | .bindcnt = p->tcf_bindcnt - bind, | ||
285 | }; | ||
276 | struct tcf_t t; | 286 | struct tcf_t t; |
277 | 287 | ||
278 | opt.old_addr = p->old_addr; | ||
279 | opt.new_addr = p->new_addr; | ||
280 | opt.mask = p->mask; | ||
281 | opt.flags = p->flags; | ||
282 | |||
283 | opt.index = p->tcf_index; | ||
284 | opt.action = p->tcf_action; | ||
285 | opt.refcnt = p->tcf_refcnt - ref; | ||
286 | opt.bindcnt = p->tcf_bindcnt - bind; | ||
287 | |||
288 | NLA_PUT(skb, TCA_NAT_PARMS, sizeof(opt), &opt); | 288 | NLA_PUT(skb, TCA_NAT_PARMS, sizeof(opt), &opt); |
289 | t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); | 289 | t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install); |
290 | t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); | 290 | t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); |
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 4a1d640b0cf1..97e84f3ee775 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -164,13 +164,14 @@ static inline int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a, | |||
164 | { | 164 | { |
165 | unsigned char *b = skb_tail_pointer(skb); | 165 | unsigned char *b = skb_tail_pointer(skb); |
166 | struct tcf_defact *d = a->priv; | 166 | struct tcf_defact *d = a->priv; |
167 | struct tc_defact opt; | 167 | struct tc_defact opt = { |
168 | .index = d->tcf_index, | ||
169 | .refcnt = d->tcf_refcnt - ref, | ||
170 | .bindcnt = d->tcf_bindcnt - bind, | ||
171 | .action = d->tcf_action, | ||
172 | }; | ||
168 | struct tcf_t t; | 173 | struct tcf_t t; |
169 | 174 | ||
170 | opt.index = d->tcf_index; | ||
171 | opt.refcnt = d->tcf_refcnt - ref; | ||
172 | opt.bindcnt = d->tcf_bindcnt - bind; | ||
173 | opt.action = d->tcf_action; | ||
174 | NLA_PUT(skb, TCA_DEF_PARMS, sizeof(opt), &opt); | 175 | NLA_PUT(skb, TCA_DEF_PARMS, sizeof(opt), &opt); |
175 | NLA_PUT_STRING(skb, TCA_DEF_DATA, d->tcfd_defdata); | 176 | NLA_PUT_STRING(skb, TCA_DEF_DATA, d->tcfd_defdata); |
176 | t.install = jiffies_to_clock_t(jiffies - d->tcf_tm.install); | 177 | t.install = jiffies_to_clock_t(jiffies - d->tcf_tm.install); |
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index e9607fe55b58..66cbf4eb8855 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c | |||
@@ -159,13 +159,14 @@ static inline int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a, | |||
159 | { | 159 | { |
160 | unsigned char *b = skb_tail_pointer(skb); | 160 | unsigned char *b = skb_tail_pointer(skb); |
161 | struct tcf_skbedit *d = a->priv; | 161 | struct tcf_skbedit *d = a->priv; |
162 | struct tc_skbedit opt; | 162 | struct tc_skbedit opt = { |
163 | .index = d->tcf_index, | ||
164 | .refcnt = d->tcf_refcnt - ref, | ||
165 | .bindcnt = d->tcf_bindcnt - bind, | ||
166 | .action = d->tcf_action, | ||
167 | }; | ||
163 | struct tcf_t t; | 168 | struct tcf_t t; |
164 | 169 | ||
165 | opt.index = d->tcf_index; | ||
166 | opt.refcnt = d->tcf_refcnt - ref; | ||
167 | opt.bindcnt = d->tcf_bindcnt - bind; | ||
168 | opt.action = d->tcf_action; | ||
169 | NLA_PUT(skb, TCA_SKBEDIT_PARMS, sizeof(opt), &opt); | 170 | NLA_PUT(skb, TCA_SKBEDIT_PARMS, sizeof(opt), &opt); |
170 | if (d->flags & SKBEDIT_F_PRIORITY) | 171 | if (d->flags & SKBEDIT_F_PRIORITY) |
171 | NLA_PUT(skb, TCA_SKBEDIT_PRIORITY, sizeof(d->priority), | 172 | NLA_PUT(skb, TCA_SKBEDIT_PRIORITY, sizeof(d->priority), |