- add "priority" (like skb->priority) classification variable to conntrack
authorMark Huang <mlhuang@cs.princeton.edu>
Mon, 20 Feb 2006 20:08:53 +0000 (20:08 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Mon, 20 Feb 2006 20:08:53 +0000 (20:08 +0000)
include/linux/netfilter_ipv4/ip_conntrack.h
net/ipv4/netfilter/ip_conntrack_core.c

index 0ea861a..029985c 100644 (file)
@@ -189,6 +189,10 @@ struct ip_conntrack
 #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
        /* VServer context id */
        xid_t xid[IP_CT_DIR_MAX];
+
+       /* Connection priority (pushed to skb->priority) */
+       /* Can be used directly by some classful qdiscs such as HTB */
+       u_int32_t priority;
 #endif
 
        /* Traversed often, so hopefully in different cacheline to top */
index d11386a..55b82ef 100644 (file)
@@ -502,6 +502,7 @@ init_conntrack(const struct ip_conntrack_tuple *tuple,
 #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
        conntrack->xid[IP_CT_DIR_ORIGINAL] = -1;
        conntrack->xid[IP_CT_DIR_REPLY] = -1;
+       conntrack->priority = (u_int32_t)-1;
 #endif
        if (!protocol->new(conntrack, skb)) {
                kmem_cache_free(ip_conntrack_cachep, conntrack);