diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-04 05:59:07 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 05:59:07 +0100 |
commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /net/sched/em_meta.c | |
parent | [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set (diff) | |
parent | [XFRM]: Fix aevent structuring to be more complete. (diff) | |
download | linux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.tar.xz linux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.zip |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 13 |
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) * Netfilter **************************************************************************/ -META_COLLECTOR(int_nfmark) +META_COLLECTOR(int_mark) { -#ifdef CONFIG_NETFILTER - dst->value = skb->nfmark; -#else - dst->value = 0; -#endif + dst->value = skb->mark; } /************************************************************************** @@ -490,7 +486,7 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { [META_ID(PKTLEN)] = META_FUNC(int_pktlen), [META_ID(DATALEN)] = META_FUNC(int_datalen), [META_ID(MACLEN)] = META_FUNC(int_maclen), - [META_ID(NFMARK)] = META_FUNC(int_nfmark), + [META_ID(NFMARK)] = META_FUNC(int_mark), [META_ID(TCINDEX)] = META_FUNC(int_tcindex), [META_ID(RTCLASSID)] = META_FUNC(int_rtclassid), [META_ID(RTIIF)] = META_FUNC(int_rtiif), @@ -550,10 +546,9 @@ static int meta_var_change(struct meta_value *dst, struct rtattr *rta) { int len = RTA_PAYLOAD(rta); - dst->val = (unsigned long) kmalloc(len, GFP_KERNEL); + dst->val = (unsigned long)kmemdup(RTA_DATA(rta), len, GFP_KERNEL); if (dst->val == 0UL) return -ENOMEM; - memcpy((void *) dst->val, RTA_DATA(rta), len); dst->len = len; return 0; } |