aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-08-13 16:58:21 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:58:17 -0400
commit25ed891019b84498c83903ecf53df7ce35e9cff6 (patch)
tree8ff7446b2ecaf535da762186d64c6a5af1762de7
parent8ffde671730df0b392ca478643b88ef7153244c0 (diff)
[NETFILTER]: Nicer names for ipt_connbytes constants
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netfilter_ipv4/ipt_connbytes.h6
-rw-r--r--net/ipv4/netfilter/ipt_connbytes.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/netfilter_ipv4/ipt_connbytes.h b/include/linux/netfilter_ipv4/ipt_connbytes.h
index abaa65afd4e..9e5532f8d8a 100644
--- a/include/linux/netfilter_ipv4/ipt_connbytes.h
+++ b/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -2,9 +2,9 @@
2#define _IPT_CONNBYTES_H 2#define _IPT_CONNBYTES_H
3 3
4enum ipt_connbytes_what { 4enum ipt_connbytes_what {
5 IPT_CONNBYTES_WHAT_PKTS, 5 IPT_CONNBYTES_PKTS,
6 IPT_CONNBYTES_WHAT_BYTES, 6 IPT_CONNBYTES_BYTES,
7 IPT_CONNBYTES_WHAT_AVGPKT, 7 IPT_CONNBYTES_AVGPKT,
8}; 8};
9 9
10enum ipt_connbytes_direction { 10enum ipt_connbytes_direction {
diff --git a/net/ipv4/netfilter/ipt_connbytes.c b/net/ipv4/netfilter/ipt_connbytes.c
index 47128c073d8..df4a42c6da2 100644
--- a/net/ipv4/netfilter/ipt_connbytes.c
+++ b/net/ipv4/netfilter/ipt_connbytes.c
@@ -54,7 +54,7 @@ match(const struct sk_buff *skb,
54 return 0; /* no match */ 54 return 0; /* no match */
55 55
56 switch (sinfo->what) { 56 switch (sinfo->what) {
57 case IPT_CONNBYTES_WHAT_PKTS: 57 case IPT_CONNBYTES_PKTS:
58 switch (sinfo->direction) { 58 switch (sinfo->direction) {
59 case IPT_CONNBYTES_DIR_ORIGINAL: 59 case IPT_CONNBYTES_DIR_ORIGINAL:
60 what = ct->counters[IP_CT_DIR_ORIGINAL].packets; 60 what = ct->counters[IP_CT_DIR_ORIGINAL].packets;
@@ -68,7 +68,7 @@ match(const struct sk_buff *skb,
68 break; 68 break;
69 } 69 }
70 break; 70 break;
71 case IPT_CONNBYTES_WHAT_BYTES: 71 case IPT_CONNBYTES_BYTES:
72 switch (sinfo->direction) { 72 switch (sinfo->direction) {
73 case IPT_CONNBYTES_DIR_ORIGINAL: 73 case IPT_CONNBYTES_DIR_ORIGINAL:
74 what = ct->counters[IP_CT_DIR_ORIGINAL].bytes; 74 what = ct->counters[IP_CT_DIR_ORIGINAL].bytes;
@@ -82,7 +82,7 @@ match(const struct sk_buff *skb,
82 break; 82 break;
83 } 83 }
84 break; 84 break;
85 case IPT_CONNBYTES_WHAT_AVGPKT: 85 case IPT_CONNBYTES_AVGPKT:
86 switch (sinfo->direction) { 86 switch (sinfo->direction) {
87 case IPT_CONNBYTES_DIR_ORIGINAL: 87 case IPT_CONNBYTES_DIR_ORIGINAL:
88 what = div64_64(ct->counters[IP_CT_DIR_ORIGINAL].bytes, 88 what = div64_64(ct->counters[IP_CT_DIR_ORIGINAL].bytes,
@@ -128,9 +128,9 @@ static int check(const char *tablename,
128 if (matchsize != IPT_ALIGN(sizeof(struct ipt_connbytes_info))) 128 if (matchsize != IPT_ALIGN(sizeof(struct ipt_connbytes_info)))
129 return 0; 129 return 0;
130 130
131 if (sinfo->what != IPT_CONNBYTES_WHAT_PKTS && 131 if (sinfo->what != IPT_CONNBYTES_PKTS &&
132 sinfo->what != IPT_CONNBYTES_WHAT_BYTES && 132 sinfo->what != IPT_CONNBYTES_BYTES &&
133 sinfo->what != IPT_CONNBYTES_WHAT_AVGPKT) 133 sinfo->what != IPT_CONNBYTES_AVGPKT)
134 return 0; 134 return 0;
135 135
136 if (sinfo->direction != IPT_CONNBYTES_DIR_ORIGINAL && 136 if (sinfo->direction != IPT_CONNBYTES_DIR_ORIGINAL &&