]> err.no Git - linux-2.6/commitdiff
[NET]: Turn nfmark into generic mark
authorThomas Graf <tgraf@suug.ch>
Thu, 9 Nov 2006 23:19:14 +0000 (15:19 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:21:38 +0000 (21:21 -0800)
nfmark is being used in various subsystems and has become
the defacto mark field for all kinds of packets. Therefore
it makes sense to rename it to `mark' and remove the
dependency on CONFIG_NETFILTER.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
28 files changed:
include/linux/skbuff.h
net/bridge/netfilter/ebt_mark.c
net/bridge/netfilter/ebt_mark_m.c
net/bridge/netfilter/ebt_ulog.c
net/core/skbuff.c
net/decnet/dn_route.c
net/ipv4/ip_output.c
net/ipv4/ipvs/ip_vs_proto_tcp.c
net/ipv4/ipvs/ip_vs_proto_udp.c
net/ipv4/netfilter.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ipt_REJECT.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/netfilter/iptable_mangle.c
net/ipv4/route.c
net/ipv6/ip6_output.c
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6table_mangle.c
net/ipv6/route.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
net/netfilter/xt_CONNMARK.c
net/netfilter/xt_MARK.c
net/netfilter/xt_mark.c
net/sched/Kconfig
net/sched/cls_fw.c
net/sched/cls_u32.c
net/sched/em_meta.c

index 7fc9a3aaa1c947c317ac0f445bd589889a444b76..e3ae544b3956e9002bdc14bd6eb4e9a2242f54b3 100644 (file)
@@ -216,7 +216,7 @@ enum {
  *     @tail: Tail pointer
  *     @end: End pointer
  *     @destructor: Destruct function
- *     @nfmark: Can be used for communication between hooks
+ *     @mark: Generic packet mark
  *     @nfct: Associated connection, if any
  *     @ipvs_property: skbuff is owned by ipvs
  *     @nfctinfo: Relationship of this skb to the connection
@@ -295,7 +295,6 @@ struct sk_buff {
 #ifdef CONFIG_BRIDGE_NETFILTER
        struct nf_bridge_info   *nf_bridge;
 #endif
-       __u32                   nfmark;
 #endif /* CONFIG_NETFILTER */
 #ifdef CONFIG_NET_SCHED
        __u16                   tc_index;       /* traffic control index */
@@ -310,6 +309,7 @@ struct sk_buff {
        __u32                   secmark;
 #endif
 
+       __u32                   mark;
 
        /* These elements must be at the end, see alloc_skb() for details.  */
        unsigned int            truesize;
index b54306a934e58196af7c136a9d27d050adeff7df..2458638561cb3e308a6b47839a0844c12cea96bd 100644 (file)
@@ -25,13 +25,13 @@ static int ebt_target_mark(struct sk_buff **pskb, unsigned int hooknr,
        int action = info->target & -16;
 
        if (action == MARK_SET_VALUE)
-               (*pskb)->nfmark = info->mark;
+               (*pskb)->mark = info->mark;
        else if (action == MARK_OR_VALUE)
-               (*pskb)->nfmark |= info->mark;
+               (*pskb)->mark |= info->mark;
        else if (action == MARK_AND_VALUE)
-               (*pskb)->nfmark &= info->mark;
+               (*pskb)->mark &= info->mark;
        else
-               (*pskb)->nfmark ^= info->mark;
+               (*pskb)->mark ^= info->mark;
 
        return info->target | -16;
 }
index a6413e4b49822aeb36d538e4f09c66be75c9cc59..025869ee0b68945b11d1331d6886123adbdd09dd 100644 (file)
@@ -19,8 +19,8 @@ static int ebt_filter_mark(const struct sk_buff *skb,
        struct ebt_mark_m_info *info = (struct ebt_mark_m_info *) data;
 
        if (info->bitmask & EBT_MARK_OR)
-               return !(!!(skb->nfmark & info->mask) ^ info->invert);
-       return !(((skb->nfmark & info->mask) == info->mark) ^ info->invert);
+               return !(!!(skb->mark & info->mask) ^ info->invert);
+       return !(((skb->mark & info->mask) == info->mark) ^ info->invert);
 }
 
 static int ebt_mark_check(const char *tablename, unsigned int hookmask,
index 9f950db3b76f5135cbb7e1ca7aca9022e5fbcc30..c1af68b5a29cacdd05ade7f014852d4809e2e1c7 100644 (file)
@@ -168,7 +168,7 @@ static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb,
        if (ub->qlen == 1)
                skb_set_timestamp(ub->skb, &pm->stamp);
        pm->data_len = copy_len;
-       pm->mark = skb->nfmark;
+       pm->mark = skb->mark;
        pm->hook = hooknr;
        if (uloginfo->prefix != NULL)
                strcpy(pm->prefix, uloginfo->prefix);
index b8b106358040e16da07b0a78794193035525b161..b3dea1ef953589cc3bde3b406b8f9b72ba891da8 100644 (file)
@@ -473,8 +473,8 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
 #endif
        C(protocol);
        n->destructor = NULL;
+       C(mark);
 #ifdef CONFIG_NETFILTER
-       C(nfmark);
        C(nfct);
        nf_conntrack_get(skb->nfct);
        C(nfctinfo);
@@ -534,8 +534,8 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
        new->pkt_type   = old->pkt_type;
        new->tstamp     = old->tstamp;
        new->destructor = NULL;
+       new->mark       = old->mark;
 #ifdef CONFIG_NETFILTER
-       new->nfmark     = old->nfmark;
        new->nfct       = old->nfct;
        nf_conntrack_get(old->nfct);
        new->nfctinfo   = old->nfctinfo;
index 23489f7232d28776585f0463deda496d188d591b..3482839af280ec094d609a86fba7ec2d22ec5170 100644 (file)
@@ -1236,7 +1236,7 @@ static int dn_route_input_slow(struct sk_buff *skb)
                                       .saddr = cb->src,
                                       .scope = RT_SCOPE_UNIVERSE,
 #ifdef CONFIG_DECNET_ROUTE_FWMARK
-                                      .fwmark = skb->nfmark
+                                      .fwmark = skb->mark
 #endif
                                    } },
                            .iif = skb->dev->ifindex };
@@ -1458,7 +1458,7 @@ int dn_route_input(struct sk_buff *skb)
                    (rt->fl.fld_dst == cb->dst) &&
                    (rt->fl.oif == 0) &&
 #ifdef CONFIG_DECNET_ROUTE_FWMARK
-                   (rt->fl.fld_fwmark == skb->nfmark) &&
+                   (rt->fl.fld_fwmark == skb->mark) &&
 #endif
                    (rt->fl.iif == cb->iif)) {
                        rt->u.dst.lastuse = jiffies;
index fc195a44fc2e1800d0ba5e32fedc9019d29562f2..23633bf042baae2374a659667defeb14c0524937 100644 (file)
@@ -386,6 +386,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        dst_release(to->dst);
        to->dst = dst_clone(from->dst);
        to->dev = from->dev;
+       to->mark = from->mark;
 
        /* Copy the flags to each fragment. */
        IPCB(to)->flags = IPCB(from)->flags;
@@ -394,7 +395,6 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        to->tc_index = from->tc_index;
 #endif
 #ifdef CONFIG_NETFILTER
-       to->nfmark = from->nfmark;
        /* Connection association is same as pre-frag packet */
        nf_conntrack_put(to->nfct);
        to->nfct = from->nfct;
index 6ff05c3a32e67913191c114dc2644dbfafbfe1fd..7de385267b33a49c8524a3b7f61e48c212cd0752 100644 (file)
@@ -84,7 +84,7 @@ tcp_conn_schedule(struct sk_buff *skb,
        }
 
        if (th->syn &&
-           (svc = ip_vs_service_get(skb->nfmark, skb->nh.iph->protocol,
+           (svc = ip_vs_service_get(skb->mark, skb->nh.iph->protocol,
                                     skb->nh.iph->daddr, th->dest))) {
                if (ip_vs_todrop()) {
                        /*
index 691c8b637b2937bb6ab62574a4bd5dac76d200b6..452cb9c384b38620043ebedff090c346c3afdcf3 100644 (file)
@@ -89,7 +89,7 @@ udp_conn_schedule(struct sk_buff *skb, struct ip_vs_protocol *pp,
                return 0;
        }
 
-       if ((svc = ip_vs_service_get(skb->nfmark, skb->nh.iph->protocol,
+       if ((svc = ip_vs_service_get(skb->mark, skb->nh.iph->protocol,
                                     skb->nh.iph->daddr, uh->dest))) {
                if (ip_vs_todrop()) {
                        /*
index e2005c6810a4e39a0765cac968adb0362645e3fb..bfc8d753a23a59e90e1f33758f7ce8aa51a38a24 100644 (file)
@@ -28,7 +28,7 @@ int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type)
                fl.nl_u.ip4_u.tos = RT_TOS(iph->tos);
                fl.oif = (*pskb)->sk ? (*pskb)->sk->sk_bound_dev_if : 0;
 #ifdef CONFIG_IP_ROUTE_FWMARK
-               fl.nl_u.ip4_u.fwmark = (*pskb)->nfmark;
+               fl.nl_u.ip4_u.fwmark = (*pskb)->mark;
 #endif
                if (ip_route_output_key(&rt, &fl) != 0)
                        return -1;
index 97556cc2e4e0cfc969bd6a4dc6429b061c4d45f2..cd520df4dcf4c36552da82a3d6a37bef5131d0f3 100644 (file)
@@ -243,7 +243,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
        pmsg->data_len        = data_len;
        pmsg->timestamp_sec   = entry->skb->tstamp.off_sec;
        pmsg->timestamp_usec  = entry->skb->tstamp.off_usec;
-       pmsg->mark            = entry->skb->nfmark;
+       pmsg->mark            = entry->skb->mark;
        pmsg->hook            = entry->info->hook;
        pmsg->hw_protocol     = entry->skb->protocol;
        
index 264763adc39bf43d6c8176455c3867687744f0f6..f0319e5ee437c5cdb8ed13cc3bbad8ec0f596a00 100644 (file)
@@ -76,7 +76,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
 
        /* This packet will not be the same as the other: clear nf fields */
        nf_reset(nskb);
-       nskb->nfmark = 0;
+       nskb->mark = 0;
        skb_init_secmark(nskb);
 
        tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl);
index 2b104ea54f48007f1f999f76e82831cc3b44b731..dbd34783a64d0e233989a869b4e934f75255ac48 100644 (file)
@@ -239,7 +239,7 @@ static void ipt_ulog_packet(unsigned int hooknum,
        pm->data_len = copy_len;
        pm->timestamp_sec = skb->tstamp.off_sec;
        pm->timestamp_usec = skb->tstamp.off_usec;
-       pm->mark = skb->nfmark;
+       pm->mark = skb->mark;
        pm->hook = hooknum;
        if (prefix != NULL)
                strncpy(pm->prefix, prefix, sizeof(pm->prefix));
index b91f3582359bf3aad31681e4c5d0f1e95c1bb4e6..62d4ccc259caf9a5d7f747b96319b0ea927fa20a 100644 (file)
@@ -132,7 +132,7 @@ ipt_local_hook(unsigned int hook,
        unsigned int ret;
        u_int8_t tos;
        __be32 saddr, daddr;
-       unsigned long nfmark;
+       u_int32_t mark;
 
        /* root is playing with raw sockets. */
        if ((*pskb)->len < sizeof(struct iphdr)
@@ -143,7 +143,7 @@ ipt_local_hook(unsigned int hook,
        }
 
        /* Save things which could affect route */
-       nfmark = (*pskb)->nfmark;
+       mark = (*pskb)->mark;
        saddr = (*pskb)->nh.iph->saddr;
        daddr = (*pskb)->nh.iph->daddr;
        tos = (*pskb)->nh.iph->tos;
@@ -154,7 +154,7 @@ ipt_local_hook(unsigned int hook,
            && ((*pskb)->nh.iph->saddr != saddr
                || (*pskb)->nh.iph->daddr != daddr
 #ifdef CONFIG_IP_ROUTE_FWMARK
-               || (*pskb)->nfmark != nfmark
+               || (*pskb)->mark != mark
 #endif
                || (*pskb)->nh.iph->tos != tos))
                if (ip_route_me_harder(pskb, RTN_UNSPEC))
index 925ee4dfc32c15039e68ddc47274239833f9cab9..4de3e38fa1a806f11d0eba8f2974e1487cb897c5 100644 (file)
@@ -1644,7 +1644,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
        rth->rt_dst     = daddr;
        rth->fl.fl4_tos = tos;
 #ifdef CONFIG_IP_ROUTE_FWMARK
-       rth->fl.fl4_fwmark= skb->nfmark;
+       rth->fl.fl4_fwmark= skb->mark;
 #endif
        rth->fl.fl4_src = saddr;
        rth->rt_src     = saddr;
@@ -1790,7 +1790,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
        rth->rt_dst     = daddr;
        rth->fl.fl4_tos = tos;
 #ifdef CONFIG_IP_ROUTE_FWMARK
-       rth->fl.fl4_fwmark= skb->nfmark;
+       rth->fl.fl4_fwmark= skb->mark;
 #endif
        rth->fl.fl4_src = saddr;
        rth->rt_src     = saddr;
@@ -1921,7 +1921,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
                                        .tos = tos,
                                        .scope = RT_SCOPE_UNIVERSE,
 #ifdef CONFIG_IP_ROUTE_FWMARK
-                                       .fwmark = skb->nfmark
+                                       .fwmark = skb->mark
 #endif
                                      } },
                            .iif = dev->ifindex };
@@ -2035,7 +2035,7 @@ local_input:
        rth->rt_dst     = daddr;
        rth->fl.fl4_tos = tos;
 #ifdef CONFIG_IP_ROUTE_FWMARK
-       rth->fl.fl4_fwmark= skb->nfmark;
+       rth->fl.fl4_fwmark= skb->mark;
 #endif
        rth->fl.fl4_src = saddr;
        rth->rt_src     = saddr;
@@ -2114,7 +2114,7 @@ int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr,
                    rth->fl.iif == iif &&
                    rth->fl.oif == 0 &&
 #ifdef CONFIG_IP_ROUTE_FWMARK
-                   rth->fl.fl4_fwmark == skb->nfmark &&
+                   rth->fl.fl4_fwmark == skb->mark &&
 #endif
                    rth->fl.fl4_tos == tos) {
                        rth->u.dst.lastuse = jiffies;
index 93330685adfc81e960e2443fbdd9906b08890baa..1bde3aca346641cd8ddbb0a8c59d962ad1d1eb0b 100644 (file)
@@ -499,12 +499,12 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        dst_release(to->dst);
        to->dst = dst_clone(from->dst);
        to->dev = from->dev;
+       to->mark = from->mark;
 
 #ifdef CONFIG_NET_SCHED
        to->tc_index = from->tc_index;
 #endif
 #ifdef CONFIG_NETFILTER
-       to->nfmark = from->nfmark;
        /* Connection association is same as pre-frag packet */
        nf_conntrack_put(to->nfct);
        to->nfct = from->nfct;
index 9fec832ee08b00057a68afc375c323fe7d42842e..21908c9a10da28600e367edf67dc03b83230473d 100644 (file)
@@ -241,7 +241,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
        pmsg->data_len        = data_len;
        pmsg->timestamp_sec   = entry->skb->tstamp.off_sec;
        pmsg->timestamp_usec  = entry->skb->tstamp.off_usec;
-       pmsg->mark            = entry->skb->nfmark;
+       pmsg->mark            = entry->skb->mark;
        pmsg->hook            = entry->info->hook;
        pmsg->hw_protocol     = entry->skb->protocol;
        
index 386ea260e76785f34f2a4a940653bce3939019f6..6250e86a6ddcafbf0fcddcae7f8707eea60037c9 100644 (file)
@@ -149,11 +149,10 @@ ip6t_local_hook(unsigned int hook,
                   int (*okfn)(struct sk_buff *))
 {
 
-       unsigned long nfmark;
        unsigned int ret;
        struct in6_addr saddr, daddr;
        u_int8_t hop_limit;
-       u_int32_t flowlabel;
+       u_int32_t flowlabel, mark;
 
 #if 0
        /* root is playing with raw sockets. */
@@ -165,10 +164,10 @@ ip6t_local_hook(unsigned int hook,
        }
 #endif
 
-       /* save source/dest address, nfmark, hoplimit, flowlabel, priority,  */
+       /* save source/dest address, mark, hoplimit, flowlabel, priority,  */
        memcpy(&saddr, &(*pskb)->nh.ipv6h->saddr, sizeof(saddr));
        memcpy(&daddr, &(*pskb)->nh.ipv6h->daddr, sizeof(daddr));
-       nfmark = (*pskb)->nfmark;
+       mark = (*pskb)->mark;
        hop_limit = (*pskb)->nh.ipv6h->hop_limit;
 
        /* flowlabel and prio (includes version, which shouldn't change either */
@@ -179,7 +178,7 @@ ip6t_local_hook(unsigned int hook,
        if (ret != NF_DROP && ret != NF_STOLEN 
                && (memcmp(&(*pskb)->nh.ipv6h->saddr, &saddr, sizeof(saddr))
                    || memcmp(&(*pskb)->nh.ipv6h->daddr, &daddr, sizeof(daddr))
-                   || (*pskb)->nfmark != nfmark
+                   || (*pskb)->mark != mark
                    || (*pskb)->nh.ipv6h->hop_limit != hop_limit))
                return ip6_route_me_harder(*pskb) == 0 ? ret : NF_DROP;
 
index e9c1fc5f21b189eec4c0530a43b9a68675a621ce..aaabb1fad1cf84d838a915c5fa9d80c8fee92873 100644 (file)
@@ -712,7 +712,7 @@ void ip6_route_input(struct sk_buff *skb)
                                .daddr = iph->daddr,
                                .saddr = iph->saddr,
 #ifdef CONFIG_IPV6_ROUTE_FWMARK
-                               .fwmark = skb->nfmark,
+                               .fwmark = skb->mark,
 #endif
                                .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
                        },
index 856ed0d1997418d8f4312bc87717c255b98a4026..bd3ffa6f1a6d525da26753a06c03368eec1d29e5 100644 (file)
@@ -501,8 +501,8 @@ __build_packet_message(struct nfulnl_instance *inst,
 #endif
        }
 
-       if (skb->nfmark) {
-               tmp_uint = htonl(skb->nfmark);
+       if (skb->mark) {
+               tmp_uint = htonl(skb->mark);
                NFA_PUT(inst->skb, NFULA_MARK, sizeof(tmp_uint), &tmp_uint);
        }
 
index 4ab7b1416bb578b7d7fd6e68effc9075b7278504..82e4454659bfb96dd794ea22c47092ebf5a2532a 100644 (file)
@@ -480,8 +480,8 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
 #endif
        }
 
-       if (entskb->nfmark) {
-               tmp_uint = htonl(entskb->nfmark);
+       if (entskb->mark) {
+               tmp_uint = htonl(entskb->mark);
                NFA_PUT(skb, NFQA_MARK, sizeof(u_int32_t), &tmp_uint);
        }
 
@@ -834,8 +834,8 @@ nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb,
        }
 
        if (nfqa[NFQA_MARK-1])
-               entry->skb->nfmark = ntohl(*(__be32 *)
-                                          NFA_DATA(nfqa[NFQA_MARK-1]));
+               entry->skb->mark = ntohl(*(__be32 *)
+                                        NFA_DATA(nfqa[NFQA_MARK-1]));
                
        issue_verdict(entry, verdict);
        instance_put(queue);
index c01524f817f04caa8a42aa5ec16dc7130fed6baf..67ed53152999b5b3e16a4b7a5248bde4c2e2398a 100644 (file)
@@ -42,7 +42,7 @@ target(struct sk_buff **pskb,
 {
        const struct xt_connmark_target_info *markinfo = targinfo;
        u_int32_t diff;
-       u_int32_t nfmark;
+       u_int32_t mark;
        u_int32_t newmark;
        u_int32_t ctinfo;
        u_int32_t *ctmark = nf_ct_get_mark(*pskb, &ctinfo);
@@ -62,7 +62,7 @@ target(struct sk_buff **pskb,
                        break;
                case XT_CONNMARK_SAVE:
                        newmark = (*ctmark & ~markinfo->mask) |
-                                 ((*pskb)->nfmark & markinfo->mask);
+                                 ((*pskb)->mark & markinfo->mask);
                        if (*ctmark != newmark) {
                                *ctmark = newmark;
 #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
@@ -73,10 +73,10 @@ target(struct sk_buff **pskb,
                        }
                        break;
                case XT_CONNMARK_RESTORE:
-                       nfmark = (*pskb)->nfmark;
-                       diff = (*ctmark ^ nfmark) & markinfo->mask;
+                       mark = (*pskb)->mark;
+                       diff = (*ctmark ^ mark) & markinfo->mask;
                        if (diff != 0)
-                               (*pskb)->nfmark = nfmark ^ diff;
+                               (*pskb)->mark = mark ^ diff;
                        break;
                }
        }
index c6e860a7114f74dae300ab94857108d44dfd93e1..0b48547e8d64bb0a2e41998733713a1b51730196 100644 (file)
@@ -31,8 +31,8 @@ target_v0(struct sk_buff **pskb,
 {
        const struct xt_mark_target_info *markinfo = targinfo;
 
-       if((*pskb)->nfmark != markinfo->mark)
-               (*pskb)->nfmark = markinfo->mark;
+       if((*pskb)->mark != markinfo->mark)
+               (*pskb)->mark = markinfo->mark;
 
        return XT_CONTINUE;
 }
@@ -54,16 +54,16 @@ target_v1(struct sk_buff **pskb,
                break;
                
        case XT_MARK_AND:
-               mark = (*pskb)->nfmark & markinfo->mark;
+               mark = (*pskb)->mark & markinfo->mark;
                break;
                
        case XT_MARK_OR:
-               mark = (*pskb)->nfmark | markinfo->mark;
+               mark = (*pskb)->mark | markinfo->mark;
                break;
        }
 
-       if((*pskb)->nfmark != mark)
-               (*pskb)->nfmark = mark;
+       if((*pskb)->mark != mark)
+               (*pskb)->mark = mark;
 
        return XT_CONTINUE;
 }
index 934dddfbcd23dd852daa8ed1476d8f0585078ace..dfa1ee6914c08eb6cfbc0da6ebcb77f35d38f9fb 100644 (file)
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
 {
        const struct xt_mark_info *info = matchinfo;
 
-       return ((skb->nfmark & info->mask) == info->mark) ^ info->invert;
+       return ((skb->mark & info->mask) == info->mark) ^ info->invert;
 }
 
 static int
index 8298ea9ffe19289f3f8b335e407aecad19f629cf..b2437092978c04c863ed65decb6c903a19cc5bd6 100644 (file)
@@ -320,7 +320,7 @@ config CLS_U32_PERF
 
 config CLS_U32_MARK
        bool "Netfilter marks support"
-       depends on NET_CLS_U32 && NETFILTER
+       depends on NET_CLS_U32
        ---help---
          Say Y here to be able to use netfilter marks as u32 key.
 
index e54acc6bcccdc94445fafd86a22ae85e0b236921..f59a2c4aa039b463e6c4c7d4fc867ce6da8a7dcb 100644 (file)
@@ -101,11 +101,7 @@ static int fw_classify(struct sk_buff *skb, struct tcf_proto *tp,
        struct fw_head *head = (struct fw_head*)tp->root;
        struct fw_filter *f;
        int r;
-#ifdef CONFIG_NETFILTER
-       u32 id = skb->nfmark & head->mask;
-#else
-       u32 id = 0;
-#endif
+       u32 id = skb->mark & head->mask;
 
        if (head != NULL) {
                for (f=head->ht[fw_hash(id)]; f; f=f->next) {
index 0a6cfa0005bed31627f6ec8de3c7ffc3763abe36..8b51948019958b39f182a6119735cc7a50c94a22 100644 (file)
@@ -143,7 +143,7 @@ next_knode:
 #endif
 
 #ifdef CONFIG_CLS_U32_MARK
-               if ((skb->nfmark & n->mark.mask) != n->mark.val) {
+               if ((skb->mark & n->mark.mask) != n->mark.val) {
                        n = n->next;
                        goto next_knode;
                } else {
index 61e3b740ab1a9b434cfc0a79955a5880e134826f..d3ff3503326aa8cc341ab74212fa5821e2a9bf41 100644 (file)
@@ -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),