diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-02-19 23:47:11 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-02-19 23:47:11 -0800 |
| commit | 144abfc2830e661ac6c0b90360af4e487f838a9e (patch) | |
| tree | 7702c051bbc825f9ff34ebd65fb2cf59cb648615 /include/linux | |
| parent | 95a0811445da78d527e87e826d7ef27c98e25d2e (diff) | |
| parent | 9abdae11c4a4d1a19885182290250749c6b2640a (diff) | |
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_nat.h | 3 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/listhelp.h | 54 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 1 |
3 files changed, 25 insertions, 33 deletions
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index 2590cb0f0203..1a4e46b2db0f 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h @@ -100,9 +100,6 @@ struct ip_nat_info /* Manipulations to be done on this conntrack. */ struct ip_nat_info_manip manips[IP_NAT_MAX_MANIPS]; - /* The mapping type which created us (NULL for null mapping). */ - const struct ip_nat_mapping_type *mtype; - struct ip_nat_hash bysource, byipsproto; /* Helper (NULL if none). */ diff --git a/include/linux/netfilter_ipv4/listhelp.h b/include/linux/netfilter_ipv4/listhelp.h index f19f448889d1..f2ae7c5e57bb 100644 --- a/include/linux/netfilter_ipv4/listhelp.h +++ b/include/linux/netfilter_ipv4/listhelp.h @@ -11,48 +11,42 @@ required to allow inlining of cmpfn. */ #define LIST_FIND(head, cmpfn, type, args...) \ ({ \ - const struct list_head *__i = (head); \ + const struct list_head *__i, *__j = NULL; \ \ ASSERT_READ_LOCK(head); \ - do { \ - __i = __i->next; \ - if (__i == (head)) { \ - __i = NULL; \ + list_for_each(__i, (head)) \ + if (cmpfn((const type)__i , ## args)) { \ + __j = __i; \ break; \ } \ - } while (!cmpfn((const type)__i , ## args)); \ - (type)__i; \ + (type)__j; \ }) -#define LIST_FIND_W(head, cmpfn, type, args...) \ -({ \ - const struct list_head *__i = (head); \ - \ - ASSERT_WRITE_LOCK(head); \ - do { \ - __i = __i->next; \ - if (__i == (head)) { \ - __i = NULL; \ - break; \ - } \ - } while (!cmpfn((type)__i , ## args)); \ - (type)__i; \ +#define LIST_FIND_W(head, cmpfn, type, args...) \ +({ \ + const struct list_head *__i, *__j = NULL; \ + \ + ASSERT_WRITE_LOCK(head); \ + list_for_each(__i, (head)) \ + if (cmpfn((type)__i , ## args)) { \ + __j = __i; \ + break; \ + } \ + (type)__j; \ }) /* Just like LIST_FIND but we search backwards */ #define LIST_FIND_B(head, cmpfn, type, args...) \ ({ \ - const struct list_head *__i = (head); \ + const struct list_head *__i, *__j = NULL; \ \ ASSERT_READ_LOCK(head); \ - do { \ - __i = __i->prev; \ - if (__i == (head)) { \ - __i = NULL; \ + list_for_each_prev(__i, (head)) \ + if (cmpfn((const type)__i , ## args)) { \ + __j = __i; \ break; \ } \ - } while (!cmpfn((const type)__i , ## args)); \ - (type)__i; \ + (type)__j; \ }) static inline int @@ -100,9 +94,9 @@ list_prepend(struct list_head *head, void *new) do { \ struct list_head *__i; \ ASSERT_WRITE_LOCK(head); \ - for (__i = (head)->next; \ - !cmpfn((new), (typeof (new))__i) && __i != (head); \ - __i = __i->next); \ + list_for_each(__i, (head)) \ + if ((new), (typeof (new))__i) \ + break; \ list_add((struct list_head *)(new), __i->prev); \ } while(0) diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index b192b7f018f5..f800e292d8a1 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -382,6 +382,7 @@ enum NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12, NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13, + NET_IPV4_NF_CONNTRACK_BUCKETS=14, }; /* /proc/sys/net/ipv6 */ |
