* Re: [PATCH] add new iptables ipt_connbytes match
From: David S. Miller @ 2005-08-13 20:58 UTC (permalink / raw)
To: kaber; +Cc: laforge, netdev, netfilter-devel
In-Reply-To: <42FD4AC6.2020506@trash.net>
From: Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH] add new iptables ipt_connbytes match
Date: Sat, 13 Aug 2005 03:20:06 +0200
> Harald Welte wrote:
> > Just send two incremental patches to Dave.
>
> Here they are. The first patch fixes the div64_64 function, the second
> one renames some constants.
Both applied, thanks Patrick.
^ permalink raw reply
* 为心爱的他/她建写真集
From: Shala @ 2005-08-13 20:58 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 807 bytes --]
^ permalink raw reply
* ±¹°¡°øÀÎÀü¹®ÀÚ°ÝÁõ"À¯Åë°ü¸®»ç"¿¡µµÀüÇϼ¼¿ä!"±âÃâ¹®Á¦"¹è¼ÛÁß!! fmayo
From: Poke @ 2005-08-13 20:57 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 1997 bytes --]
^ permalink raw reply
* Re: [PATCH] add new iptables ipt_connbytes match
From: David S. Miller @ 2005-08-13 20:56 UTC (permalink / raw)
To: laforge; +Cc: netdev, netfilter-devel, kaber, ak
In-Reply-To: <20050813154619.GI4551@rama.de.gnumonks.org>
From: Harald Welte <laforge@netfilter.org>
Date: Sat, 13 Aug 2005 17:46:19 +0200
> [NETFILTER] Add new iptables "connbytes" match
Applied.
^ permalink raw reply
* Re: [PATCH] introduce and use aligned_u64 in nfnetlink
From: David S. Miller @ 2005-08-13 20:56 UTC (permalink / raw)
To: laforge; +Cc: netdev, netfilter-devel, kaber, ak
In-Reply-To: <20050813154534.GH4551@rama.de.gnumonks.org>
From: Harald Welte <laforge@netfilter.org>
Date: Sat, 13 Aug 2005 17:45:34 +0200
> [NETFILTER] introduce and use aligned_u64 data type
Applied.
^ permalink raw reply
* [°³ÀÎȸ»ý]ÀÌÁ¦¾îµÒ¿¡¼ ±×¸¸³ª¿À¼¼¿©.!!µµ¿Íµå¸®°Ú½À´Ï´Ù.!!
From: "°³ÀÎȸ»ý5" <iysemggbpb @ 2005-08-13 20:56 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 427 bytes --]
^ permalink raw reply
* Elliot Nieves
From: Deirdre Moreno @ 2005-08-13 20:56 UTC (permalink / raw)
To: tucker; +Cc: lowe, pcp, failsafe, netdev, outgoing, owner-csa
Jeanine,
http://uk.geocities.com/winning_at_the_closing_bell /6626415.html
Jeannine Toney
^ permalink raw reply
* Re: [PATCH] add new iptables ipt_connbytes match
From: David S. Miller @ 2005-08-13 20:54 UTC (permalink / raw)
To: laforge; +Cc: netdev, netfilter-devel, kaber, ak
In-Reply-To: <20050813145023.GA4551@rama.de.gnumonks.org>
From: Harald Welte <laforge@netfilter.org>
Date: Sat, 13 Aug 2005 16:50:23 +0200
> So for new development, I'm now more inclined to push things sooner to
> you - even more for code that only adds new featurss. If you generally
> dislike that, please let me know.
I think this is the way to go.
^ permalink raw reply
* Sex-addicts in your area
From: Terrence Pendleton @ 2005-08-13 20:34 UTC (permalink / raw)
To: netdev
There is this %FREE %DATESITE %FILLED with %TONS %SEXOHOLICS
%FLOWERS %JUST :)
There are also %SOME who want %SERIOUS though
So if you want %ONEORLONG you got it ;)
Whatever floats your boat pretty much!
http://www.lovercantors.com
^ permalink raw reply
* (±¤°í)Â÷·®¿ë³Ã.¿ÂÀå°í 4¸¸9õ¿øÆ¯º°ÇÒÀÎ ÆÇ¸Å @
From: ÀÌ¿µÈñ @ 2005-08-13 20:09 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 2434 bytes --]
^ permalink raw reply
* Оборoтный капитал. Kак yвеличuть эффeктивнoсть pабoты.
From: 23-24 авгуcта @ 2005-08-13 19:57 UTC (permalink / raw)
To: mmzkhkw
[-- Attachment #1: Type: text/html, Size: 7039 bytes --]
^ permalink raw reply
* Re:[631] soft
From: Macy @ 2005-08-13 19:23 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 3041 bytes --]
^ permalink raw reply
* ¸¶ÄÉÆÃ10³â³ëÇÏ¿ì,¿Ïº®°ËÁõ
From: Barbara Trent @ 2005-08-13 18:42 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 3546 bytes --]
^ permalink raw reply
* 教你成為英文快速記憶高手唷!!
From: 記憶高手 @ 2005-08-13 18:35 UTC (permalink / raw)
[-- Attachment #1: Type: text/html, Size: 2863 bytes --]
^ permalink raw reply
* Get your personalized rate quote NOW!
From: Nanette Carney @ 2005-08-13 18:14 UTC (permalink / raw)
To: xfs-masters
[-- Attachment #1: Type: text/html, Size: 804 bytes --]
^ permalink raw reply
* ºÒȲÀ» ±Øº¹Çϴ¸¶ÄÉÆÃ³ëÇÏ¿ì
From: Cody Koenig @ 2005-08-13 17:48 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 3533 bytes --]
^ permalink raw reply
* 保證您從未見過的不用插電檯燈
From: cumvxaqabhxujam @ 2005-08-13 17:42 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: Type: text/html, Size: 507 bytes --]
^ permalink raw reply
* [°³ÀÎȸ»ý]Ä«µåºû,ÀºÇà±Ç´ëÃâ,´ãº¸/º¸Áõ..¸ðµçºû Çѹø¿¡ û»ê!
From: °³ÀÎȸ»ý2 @ 2005-08-13 17:40 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 427 bytes --]
^ permalink raw reply
* Top 30 Downloads
From: Matty @ 2005-08-13 17:13 UTC (permalink / raw)
To: netdev
Cheap software store
http://harshly.richbus.com/
You are only as wise as others perceive you to be.
Man is the artificer of his own happiness.
UXORIOUSNESS, n. A perverted affection that has strayed to one's own wife.
^ permalink raw reply
* TRANSFER!!!
From: chenqingxuan470 @ 2005-08-13 17:01 UTC (permalink / raw)
To: claims123
[-- Attachment #1: Type: text/plain, Size: 3309 bytes --]
HANG SENG BANK LTD.
19 DES VOEUX RD.
CENTRAL HONG KONG, HONK KONG.
EMAIL: chenqingxuan470@yahoo.com.hk
TEL/FAX:00852-301-62402.
Dear One,
I am Mr. Chen Qing Xuan, senior credit officer of the HANG SENG BANK LTD.I have a concealed proposal for you. After the United State and Iraqi war, our client Hatem Kamil Abdul Fatah who was the deputy governor of Baghdad in Iraq and also business man made a numbered fixed deposit for 12 calendar months, with a value of Six Million Seven Hundred Thousand United State Dollars only in my branch. Upon maturity several notice was sent to him, even after the war late this year. Again after the war another notification was sent and still no response came from him. We later find out that the Governor has been assasinated in Baghdad.
The websites below is a verification of the news. about hisdeath:
http://news.bbc.co.uk/go/pr/fr/-/1/hi/world/middle_east/3970619.stm http://www.uslaboragainstwar.org/article.php?id=6979
After further investigation it was also discovered that Hatem Kamil Abdul Fatah did not declare any next of kin in his official papers including the paper work of his bank deposit. And he also confided in me the last time he was at my office that no one except me knew of his deposit in my bank.So,Six millions Five Hundred Thousand United State Dollars is still lying in my bank and no one will ever come forward to claim it. What bothers me most is that according to the laws of my country at the expiration three years the funds will revert to the ownership of the Hong Kong Government if nobody applies to claim the funds. Against this backdrop, my suggestion to you is that I will like you as a foreigner to stand as the next of kin to Hatem Kamil Abdul Fatah so that you will be able to receive his funds.
THE REREQUISITE OF THE PROJECT.
I want you to know that I have had everything planned out so that we shall come out successful. Ihave contacted an attorney that will prepare the necessary document that will back you up as the next of kin to Hatem Kamil AbdulFatah,all that is required from you at this stage is for you to provide me with your Full Names and Address so that the attorney can commence his job. After you have been made the next of kin,the attorney will also file in for claims on your behalf and secure the necessary approval and letter of probate in your favor for the move of the funds to an account that will be provided by you. There is no risk involved at all in the matter as we are going to adopt a legalized method and the attorney will prepare all the necessary documents.
Please endeavor to observe utmost discretion in all matters concerning this issue.Once the funds have been transferred to your nominated bank account we shall share in the ratio of 60% for me, 30% for you and 10% for any expenses incurred during the course of this operation. Should you be interested please send me your full particulars including your private phone and fax numbers for easy communication, you can write me via the above email box at: chenqingxuan470@yahoo.com.hk and I will provide you with more details of this operation as well as my particulars. Your earliest response to this letter will be appreciated.
Kind Regards,
Chen Qing Xuan
TEL/FAX:00852-301-62402.
^ permalink raw reply
* ƼŸ´½ ÆÐ¼Ç°Ç°ÆÈÂî-°øÀåºÎµµÃ³ºÐ
From: Yvette Dolan @ 2005-08-13 16:44 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 391 bytes --]
^ permalink raw reply
* 我在家減重成功
From: 「健康快遞」 @ 2005-08-13 16:25 UTC (permalink / raw)
[-- Attachment #1: Type: text/html, Size: 2453 bytes --]
^ permalink raw reply
* ºÒȲÀ» ±Øº¹Çϴ¸¶ÄÉÆÃ³ëÇÏ¿ì
From: Denise Huff @ 2005-08-13 16:12 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/html, Size: 3552 bytes --]
^ permalink raw reply
* SPANISH E-MAIL RESULT
From: SPANISH SWEEPSTAKE @ 2005-08-13 15:53 UTC (permalink / raw)
To: netdev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="DEFAULT", Size: 2865 bytes --]
SPANISH SWEEPSTAKE LOTTERY
INTERNATIONAL PROMOTION/PRIZE AWARD DEPT.
CALLE GRANVIA 32N 1C MADRID SPAIN
REF: RSSL/61-ILGI0509/45
BATCH:RSSL/15/096/WRCS
RE: WINNING FINAL NOTIFICATION
13/08/2005
Dear Winner,
WINNING NOTIFICATION
We happily announce to you the draw of the Royal spanish Sweepstake Lottery International programs held on the 25st July 2005 in Madrid Spain.Your e-mail
address attached to ticket number: 212005600545 188 with Serial number 4888/02 drew the lucky numbers: 41-6-76-13-45-8, which subsequently won you the lottery in the 2nd category.You have therefore been approved to claim a total sum of 1,000,000.00 Euro(One million Euro) in cash credited to file KPC/9080333308/03.This is from a total cash prize of Ten Million Euro(10 million Euro), shared amongst the first Tenth (10th) lucky winners in this category.Please note that your lucky winning number falls within our Madrid booklet representative office in Spain as indicated in your play coupon.In view of this, your 1,000,000.00 Euro(One million Euro) would be released to you by our security firm in Madrid,Spain.Our agent will immediately commence the process to facilitate the release of your funds as soon as you contact him.All participants were selected randomly from World Wide Web site through computer draw system and extracted from over 100,000 companies. This promotion takes place annually. For security reasons, you are advised to keep your winning information confidential till your claims is processed and your money remitted to you in whatever manner you deem fit to claim your prize. This is part of our precautionary measure to avoid double claiming and unwarranted abuse of this program by some unscrupulous elements. Please be warned.
To file for your claim, please contact our fiduciary agent:
Mr Juan Lopez
Santa Maria Security&Consultant Madrid Spain.
.
Email:santamariaser@netscape.net or santamariaconsu@fsmail.net
For due processing and remittance of your prize money to a designated account of your choice.
Remember,You are to contact our agents by email and within a week of receiving this notice.After this date, all funds will be returned to the MINISTERIO DE ECONOMIA Y HACIENDA as unclaimed.
To avoid unnecessary delays and complications,please quote your reference/batch numbers in any correspondences with us or our designated agent.Congratulations once more from all members and staffs of this program.
Also be informed that 10% of your lottery winning belongs to the security company because they are the company assigned to process your winnings to you.
NOTE this 10% will be collected after you have received your winning prize because the money is insured in your name i.e email address already.
Yours Sincerely,
Wilfred Alberto
Lottery Director.
^ permalink raw reply
* Re: [PATCH] add new iptables ipt_connbytes match
From: Harald Welte @ 2005-08-13 15:46 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, netfilter-devel, kaber, ak
In-Reply-To: <20050812.120904.88476024.davem@davemloft.net>
[-- Attachment #1.1: Type: text/plain, Size: 444 bytes --]
The reworked version (already uses aligned_u64). Pleas apply, thanks
--
- Harald Welte <laforge@netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #1.2: 46-ipt_connbytes.patch --]
[-- Type: text/plain, Size: 8283 bytes --]
[NETFILTER] Add new iptables "connbytes" match
This patch ads a new "connbytes" match that utilizes the CONFIG_NF_CT_ACCT
per-connection byte and packet counters. Using it you can do things like
packet classification on average packet size within a connection.
Signed-off-by: Harald Welte <laforge@netfilter.org>
---
commit 98a0b5554e6e54a5a5a21b21b212186dc3c2118c
tree 43acbfa60366e1b111272851f1a1745a43a71d74
parent 5896088f554d8c2e7f3226973d1413df339e6b75
author Harald Welte <laforge@netfilter.org> Do, 11 Aug 2005 21:15:45 +0200
committer Harald Welte <laforge@netfilter.org> Do, 11 Aug 2005 21:15:45 +0200
include/linux/netfilter_ipv4/ipt_connbytes.h | 25 ++++
net/ipv4/netfilter/Kconfig | 11 ++
net/ipv4/netfilter/Makefile | 1
net/ipv4/netfilter/ipt_connbytes.c | 166 ++++++++++++++++++++++++++
4 files changed, 202 insertions(+), 1 deletions(-)
diff --git a/include/linux/netfilter_ipv4/ipt_connbytes.h b/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 100644
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1,25 @@
+#ifndef _IPT_CONNBYTES_H
+#define _IPT_CONNBYTES_H
+
+enum ipt_connbytes_what {
+ IPT_CONNBYTES_WHAT_PKTS,
+ IPT_CONNBYTES_WHAT_BYTES,
+ IPT_CONNBYTES_WHAT_AVGPKT,
+};
+
+enum ipt_connbytes_direction {
+ IPT_CONNBYTES_DIR_ORIGINAL,
+ IPT_CONNBYTES_DIR_REPLY,
+ IPT_CONNBYTES_DIR_BOTH,
+};
+
+struct ipt_connbytes_info
+{
+ struct {
+ aligned_u64 from; /* count to be matched */
+ aligned_u64 to; /* count to be matched */
+ } count;
+ u_int8_t what; /* ipt_connbytes_what */
+ u_int8_t direction; /* ipt_connbytes_direction */
+};
+#endif
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -386,6 +386,16 @@ config IP_NF_MATCH_CONNMARK
<file:Documentation/modules.txt>. The module will be called
ipt_connmark.o. If unsure, say `N'.
+config IP_NF_MATCH_CONNBYTES
+ tristate 'Connection byte/packet counter match support'
+ depends on IP_NF_CT_ACCT && IP_NF_IPTABLES
+ help
+ This option adds a `connbytes' match, which allows you to match the
+ number of bytes and/or packets for each direction within a connection.
+
+ If you want to compile it as a module, say M here and read
+ <file:Documentation/modules.txt>. If unsure, say `N'.
+
config IP_NF_MATCH_HASHLIMIT
tristate 'hashlimit match support'
depends on IP_NF_IPTABLES
@@ -723,6 +733,5 @@ config IP_NF_CONNTRACK_NETLINK
help
This option enables support for a netlink-based userspace interface
-
endmenu
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl
obj-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state.o
obj-$(CONFIG_IP_NF_MATCH_CONNMARK) += ipt_connmark.o
obj-$(CONFIG_IP_NF_MATCH_CONNTRACK) += ipt_conntrack.o
+obj-$(CONFIG_IP_NF_MATCH_CONNBYTES) += ipt_connbytes.o
obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss.o
obj-$(CONFIG_IP_NF_MATCH_REALM) += ipt_realm.o
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
diff --git a/net/ipv4/netfilter/ipt_connbytes.c b/net/ipv4/netfilter/ipt_connbytes.c
new file mode 100644
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_connbytes.c
@@ -0,0 +1,166 @@
+/* Kernel module to match connection tracking byte counter.
+ * GPL (C) 2002 Martin Devera (devik@cdi.cz).
+ *
+ * 2004-07-20 Harald Welte <laforge@netfilter.org>
+ * - reimplemented to use per-connection accounting counters
+ * - add functionality to match number of packets
+ * - add functionality to match average packet size
+ * - add support to match directions seperately
+ *
+ */
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netfilter_ipv4/ip_conntrack.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_connbytes.h>
+
+#include <asm/div64.h>
+#include <asm/bitops.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
+MODULE_DESCRIPTION("iptables match for matching number of pkts/bytes per connection");
+
+/* 64bit divisor, dividend and result. dynamic precision */
+static u_int64_t div64_64(u_int64_t divisor, u_int64_t dividend)
+{
+ u_int64_t result = divisor;
+
+ if (dividend > 0xffffffff) {
+ int first_bit = find_first_bit((unsigned long *) ÷nd, sizeof(dividend));
+ /* calculate number of bits to shift. shift exactly enough
+ * bits to make dividend fit in 32bits. */
+ int num_shift = (64 - 32 - first_bit);
+ /* first bit has to be < 32, since dividend was > 0xffffffff */
+ result = result >> num_shift;
+ dividend = dividend >> num_shift;
+ }
+
+ do_div(divisor, dividend);
+
+ return divisor;
+}
+
+static int
+match(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo,
+ int offset,
+ int *hotdrop)
+{
+ const struct ipt_connbytes_info *sinfo = matchinfo;
+ enum ip_conntrack_info ctinfo;
+ struct ip_conntrack *ct;
+ u_int64_t what = 0; /* initialize to make gcc happy */
+
+ if (!(ct = ip_conntrack_get((struct sk_buff *)skb, &ctinfo)))
+ return 0; /* no match */
+
+ switch (sinfo->what) {
+ case IPT_CONNBYTES_WHAT_PKTS:
+ switch (sinfo->direction) {
+ case IPT_CONNBYTES_DIR_ORIGINAL:
+ what = ct->counters[IP_CT_DIR_ORIGINAL].packets;
+ break;
+ case IPT_CONNBYTES_DIR_REPLY:
+ what = ct->counters[IP_CT_DIR_REPLY].packets;
+ break;
+ case IPT_CONNBYTES_DIR_BOTH:
+ what = ct->counters[IP_CT_DIR_ORIGINAL].packets;
+ what += ct->counters[IP_CT_DIR_REPLY].packets;
+ break;
+ }
+ break;
+ case IPT_CONNBYTES_WHAT_BYTES:
+ switch (sinfo->direction) {
+ case IPT_CONNBYTES_DIR_ORIGINAL:
+ what = ct->counters[IP_CT_DIR_ORIGINAL].bytes;
+ break;
+ case IPT_CONNBYTES_DIR_REPLY:
+ what = ct->counters[IP_CT_DIR_REPLY].bytes;
+ break;
+ case IPT_CONNBYTES_DIR_BOTH:
+ what = ct->counters[IP_CT_DIR_ORIGINAL].bytes;
+ what += ct->counters[IP_CT_DIR_REPLY].bytes;
+ break;
+ }
+ break;
+ case IPT_CONNBYTES_WHAT_AVGPKT:
+ switch (sinfo->direction) {
+ case IPT_CONNBYTES_DIR_ORIGINAL:
+ what = div64_64(ct->counters[IP_CT_DIR_ORIGINAL].bytes,
+ ct->counters[IP_CT_DIR_ORIGINAL].packets);
+ break;
+ case IPT_CONNBYTES_DIR_REPLY:
+ what = div64_64(ct->counters[IP_CT_DIR_REPLY].bytes,
+ ct->counters[IP_CT_DIR_REPLY].packets);
+ break;
+ case IPT_CONNBYTES_DIR_BOTH:
+ {
+ u_int64_t bytes;
+ u_int64_t pkts;
+ bytes = ct->counters[IP_CT_DIR_ORIGINAL].bytes +
+ ct->counters[IP_CT_DIR_REPLY].bytes;
+ pkts = ct->counters[IP_CT_DIR_ORIGINAL].packets+
+ ct->counters[IP_CT_DIR_REPLY].packets;
+
+ /* FIXME_THEORETICAL: what to do if sum
+ * overflows ? */
+
+ what = div64_64(bytes, pkts);
+ }
+ break;
+ }
+ break;
+ }
+
+ if (sinfo->count.to)
+ return (what <= sinfo->count.to && what >= sinfo->count.from);
+ else
+ return (what >= sinfo->count.from);
+}
+
+static int check(const char *tablename,
+ const struct ipt_ip *ip,
+ void *matchinfo,
+ unsigned int matchsize,
+ unsigned int hook_mask)
+{
+ const struct ipt_connbytes_info *sinfo = matchinfo;
+
+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_connbytes_info)))
+ return 0;
+
+ if (sinfo->what != IPT_CONNBYTES_WHAT_PKTS &&
+ sinfo->what != IPT_CONNBYTES_WHAT_BYTES &&
+ sinfo->what != IPT_CONNBYTES_WHAT_AVGPKT)
+ return 0;
+
+ if (sinfo->direction != IPT_CONNBYTES_DIR_ORIGINAL &&
+ sinfo->direction != IPT_CONNBYTES_DIR_REPLY &&
+ sinfo->direction != IPT_CONNBYTES_DIR_BOTH)
+ return 0;
+
+ return 1;
+}
+
+static struct ipt_match state_match = {
+ .name = "connbytes",
+ .match = &match,
+ .checkentry = &check,
+ .me = THIS_MODULE
+};
+
+static int __init init(void)
+{
+ return ipt_register_match(&state_match);
+}
+
+static void __exit fini(void)
+{
+ ipt_unregister_match(&state_match);
+}
+
+module_init(init);
+module_exit(fini);
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox