aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/em_meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r--net/sched/em_meta.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 61e3b740ab1a..45d47d37155e 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -208,13 +208,9 @@ META_COLLECTOR(int_maclen)
208 * Netfilter 208 * Netfilter
209 **************************************************************************/ 209 **************************************************************************/
210 210
211META_COLLECTOR(int_nfmark) 211META_COLLECTOR(int_mark)
212{ 212{
213#ifdef CONFIG_NETFILTER 213 dst->value = skb->mark;
214 dst->value = skb->nfmark;
215#else
216 dst->value = 0;
217#endif
218} 214}
219 215
220/************************************************************************** 216/**************************************************************************
@@ -490,7 +486,7 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = {
490 [META_ID(PKTLEN)] = META_FUNC(int_pktlen), 486 [META_ID(PKTLEN)] = META_FUNC(int_pktlen),
491 [META_ID(DATALEN)] = META_FUNC(int_datalen), 487 [META_ID(DATALEN)] = META_FUNC(int_datalen),
492 [META_ID(MACLEN)] = META_FUNC(int_maclen), 488 [META_ID(MACLEN)] = META_FUNC(int_maclen),
493 [META_ID(NFMARK)] = META_FUNC(int_nfmark), 489 [META_ID(NFMARK)] = META_FUNC(int_mark),
494 [META_ID(TCINDEX)] = META_FUNC(int_tcindex), 490 [META_ID(TCINDEX)] = META_FUNC(int_tcindex),
495 [META_ID(RTCLASSID)] = META_FUNC(int_rtclassid), 491 [META_ID(RTCLASSID)] = META_FUNC(int_rtclassid),
496 [META_ID(RTIIF)] = META_FUNC(int_rtiif), 492 [META_ID(RTIIF)] = META_FUNC(int_rtiif),
@@ -550,10 +546,9 @@ static int meta_var_change(struct meta_value *dst, struct rtattr *rta)
550{ 546{
551 int len = RTA_PAYLOAD(rta); 547 int len = RTA_PAYLOAD(rta);
552 548
553 dst->val = (unsigned long) kmalloc(len, GFP_KERNEL); 549 dst->val = (unsigned long)kmemdup(RTA_DATA(rta), len, GFP_KERNEL);
554 if (dst->val == 0UL) 550 if (dst->val == 0UL)
555 return -ENOMEM; 551 return -ENOMEM;
556 memcpy((void *) dst->val, RTA_DATA(rta), len);
557 dst->len = len; 552 dst->len = len;
558 return 0; 553 return 0;
559} 554}