Netdev List
 help / color / mirror / Atom feed
* "ö.ôéùîï "äù÷òäîãäéîä áðëñ îðéá 
From: áéú äù÷òåú áðãì @ 2005-08-13  1:04 UTC (permalink / raw)
  To: Netdev

[-- Attachment #1: Type: text/html, Size: 4577 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply

* Re: [PATCH] add new iptables ipt_connbytes match
From: Patrick McHardy @ 2005-08-13  1:20 UTC (permalink / raw)
  To: Harald Welte; +Cc: Linux Netdev List, Netfilter Development Mailinglist
In-Reply-To: <20050812115622.GD16325@rama.de.gnumonks.org>

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

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.


[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1723 bytes --]

[NETFILTER]: Fix div64_64 in ipt_connbytes

Signded-off-by: Patrick McHardy <kaber@trash.net>

---
commit 62084bc1a04e2fbc492566fa30997bd0a7aa2d0a
tree 083c8042609e0da81f0be9e15583d5d31b54e685
parent 68e734a5864ba568058c3b8ea63fac3d7d567542
author Patrick McHardy <kaber@trash.net> Sat, 13 Aug 2005 03:16:32 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 13 Aug 2005 03:16:32 +0200

 net/ipv4/netfilter/ipt_connbytes.c |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_connbytes.c b/net/ipv4/netfilter/ipt_connbytes.c
--- a/net/ipv4/netfilter/ipt_connbytes.c
+++ b/net/ipv4/netfilter/ipt_connbytes.c
@@ -22,23 +22,19 @@ MODULE_AUTHOR("Harald Welte <laforge@net
 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)
+static u_int64_t div64_64(u_int64_t dividend, u_int64_t divisor)
 {
-	u_int64_t result = divisor;
+	u_int32_t d = divisor;
 
-	if (dividend > 0xffffffff) {
-		int first_bit = find_first_bit((unsigned long *) &dividend, 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;
-	}
+	if (divisor > 0xffffffffULL) {
+		unsigned int shift = fls(divisor >> 32);
 
-	do_div(divisor, dividend);
+		d = divisor >> shift;
+		dividend >>= shift;
+	}
 
-	return divisor;
+	do_div(dividend, d);
+	return dividend;
 }
 
 static int

[-- Attachment #3: 02.diff --]
[-- Type: text/x-patch, Size: 2507 bytes --]

[NETFILTER]: Nicer names for ipt_connbytes constants

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit e0d3e09ba22a139cbee328bc2622e984b65ba53e
tree 83efbc8d53045825333db5f4e321e28b331f7e30
parent 8f48c662a6f9cd2cdaec9d9866cebf8b40155f70
author Patrick McHardy <kaber@trash.net> Sat, 13 Aug 2005 03:18:30 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 13 Aug 2005 03:18:30 +0200

 include/linux/netfilter_ipv4/ipt_connbytes.h |    6 +++---
 net/ipv4/netfilter/ipt_connbytes.c           |   12 ++++++------
 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
--- a/include/linux/netfilter_ipv4/ipt_connbytes.h
+++ b/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -2,9 +2,9 @@
 #define _IPT_CONNBYTES_H
 
 enum ipt_connbytes_what {
-	IPT_CONNBYTES_WHAT_PKTS,
-	IPT_CONNBYTES_WHAT_BYTES,
-	IPT_CONNBYTES_WHAT_AVGPKT,
+	IPT_CONNBYTES_PKTS,
+	IPT_CONNBYTES_BYTES,
+	IPT_CONNBYTES_AVGPKT,
 };
 
 enum ipt_connbytes_direction {
diff --git a/net/ipv4/netfilter/ipt_connbytes.c b/net/ipv4/netfilter/ipt_connbytes.c
--- a/net/ipv4/netfilter/ipt_connbytes.c
+++ b/net/ipv4/netfilter/ipt_connbytes.c
@@ -54,7 +54,7 @@ match(const struct sk_buff *skb,
 		return 0; /* no match */
 
 	switch (sinfo->what) {
-	case IPT_CONNBYTES_WHAT_PKTS:
+	case IPT_CONNBYTES_PKTS:
 		switch (sinfo->direction) {
 		case IPT_CONNBYTES_DIR_ORIGINAL:
 			what = ct->counters[IP_CT_DIR_ORIGINAL].packets;
@@ -68,7 +68,7 @@ match(const struct sk_buff *skb,
 			break;
 		}
 		break;
-	case IPT_CONNBYTES_WHAT_BYTES:
+	case IPT_CONNBYTES_BYTES:
 		switch (sinfo->direction) {
 		case IPT_CONNBYTES_DIR_ORIGINAL:
 			what = ct->counters[IP_CT_DIR_ORIGINAL].bytes;
@@ -82,7 +82,7 @@ match(const struct sk_buff *skb,
 			break;
 		}
 		break;
-	case IPT_CONNBYTES_WHAT_AVGPKT:
+	case IPT_CONNBYTES_AVGPKT:
 		switch (sinfo->direction) {
 		case IPT_CONNBYTES_DIR_ORIGINAL:
 			what = div64_64(ct->counters[IP_CT_DIR_ORIGINAL].bytes,
@@ -128,9 +128,9 @@ static int check(const char *tablename,
 	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)
+	if (sinfo->what != IPT_CONNBYTES_PKTS &&
+	    sinfo->what != IPT_CONNBYTES_BYTES &&
+	    sinfo->what != IPT_CONNBYTES_AVGPKT)
 		return 0;
 
 	if (sinfo->direction != IPT_CONNBYTES_DIR_ORIGINAL &&

^ permalink raw reply

* Ä«µåÀÚ±Ý ´çÀÏ´ëÃâ!!Ä«µå¼ÒÁöÀÚ ´©±¸³ªÃÖÀú±Ý¸®´çÀÏ´ëÃâÀ»Áï½ÃÇØµå¸³´Ï´Ù.
From: Ä«µå´ë³³100% @ 2005-08-13  1:20 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 680 bytes --]

^ permalink raw reply

* Re:[26] soft
From: Carey @ 2005-08-13  1:31 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 3055 bytes --]

^ permalink raw reply

* ´Ù½Ã ÀÏ¾î ³ª¼¼¿ä.¶Ç ÇѹøÀÇ ±âȸ¸¦µå¸®°Ú½À´Ï´Ù. hca
From: Odis Baxter @ 2005-08-13  1:47 UTC (permalink / raw)
  To: majordomo

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

<TABLE WIDTH=700 BORDER=0 align=center CELLPADDING=0 CELLSPACING=0>
<TR><TD><IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_01.gif></TD></TR>
<TR><TD><IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_02.gif></TD></TR>
<TR><TD><a
href=http://%6ao%730216.c%61%66e24.com/or002_01.php?partner=root target=_blank>
<IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_03.gif border=0></a></TD></TR>
<TR><TD><IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_04.gif></TD></TR>
<TR><TD><a
href=http://%6ao%730216.c%61%66e24.com/or002_02.php?partner=root target=_blank>
<IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_05.gif border=0></a></TD></TR>
<TR><TD><IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_06.gif></TD></TR>
<TR><TD><a href=http://%6ao%730216.c%61%66e24.com/partner/RejectMail.php target=_blank>
<IMG SRC=http://%6ao%730216.c%61%66e24.com/form_img/002/images/form_img_07.gif border=0></a></TD>
</TR></TABLE>

xuyl ua p
dfc nom rupf
w
 jrervnh
sj zja
ie kz

dy k
 duvkuqnow vqzsvfvs

^ permalink raw reply

* RE:NEW PRODUCT..
From: Abduiyemil @ 2005-08-13  2:29 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 952 bytes --]

^ permalink raw reply

* (no subject)
From: d1187e7720r @ 2005-08-13  2:36 UTC (permalink / raw)




^ permalink raw reply

* ¡ßºñ¾Æ±×¶ó,½Ã¾Ë¸®½º,¿©¼º ÈïºÐÁ¦..!!Á¤Ç°ÆÇ¸Å..¡Ý
From: Mattie Fuller @ 2005-08-13  2:36 UTC (permalink / raw)
  To: majordomo

[-- Attachment #1: Type: text/html, Size: 957 bytes --]

^ permalink raw reply

* 10ºÐ¾¿¸¸ ÅõÀÚÇÏ¿©¹«·á·Î ¿µ¾îȸȭüÇèÇØº¸¼¼¿ä~~**
From: Isaac Holt @ 2005-08-13  2:46 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 2635 bytes --]

^ permalink raw reply

* Cialis for you
From: Masirodin @ 2005-08-13  2:46 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 442 bytes --]

^ permalink raw reply

* 0.4% ÃÖÀú±Ý¸®´ëÃ⺸Àå!!±Ý¸®ºÎ´ãÀ»È®½ÇÈ÷ÁÙ¿©µå¸®°Ú½À´Ï´Ù.
From: ´©±¸³ª´ëÃâ @ 2005-08-13  2:47 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 590 bytes --]

^ permalink raw reply

* netdev,网上开店,轻松赚钱! 10:51:16
From: popytcs @ 2005-08-13  2:51 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

请用HTML格式浏览本邮件!


---------------------------------
[声明] 以下文字与邮件内容无关! 

虚拟主机30元起,国际域名60元……

详细请访问 http://eol2000.com
---------------------------------

[-- Attachment #2: Type: text/html, Size: 8192 bytes --]

^ permalink raw reply

* Get yourself back on track today!
From: Geoffrey @ 2005-08-13  3:11 UTC (permalink / raw)
  To: netdev

Want to make women adore you? Click here.
http://tqp.wtzpixe7t6emife.eglobbymanbn.com



Man is the Only Animal that Blushes. Or needs to.   
The will to do, the soul to dare.     
The only way to have a friend is to be one.  

^ permalink raw reply

* ¡á¡á¡á¼±Âø¼ø333¸í²²¸ø¸»¸®´ÂÀ̺¥Æ®¡á¡á¡á rvkf i xft
From: master @ 2005-08-13  3:14 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 4947 bytes --]

^ permalink raw reply

* ^[$B5$7Z$KB(2q$$$GM7$Y$k^[(B\x03
From: info @ 2005-08-13  3:16 UTC (permalink / raw)
  To: netdev

^[$B5$7Z$KAGAa$/4JC1$K40A43d@Z$j%(%C%A$,B(=PMh$A$c$$$^$9"v^[(B
^[$BL5NA$*;n$7EPO?$b$"$j$^$9$+$i0B?4$7$F$4MxMQ2<$5$$!#^[(B
^[$B$*;n$740A4L5NAF~$j8}"M^[(B http://awg.webchu.com/sweet-s/?rcc



*_________________________________*
^[$B"(^[(BI don't veceive your mail^[$B"-^[(B
send_sweet69@poppymail.com
^[$B"(%a!<%kITMW"-^[(B
send_sweet69@poppymail.com
*__________________________________*

^ permalink raw reply

* 1%´ëÀÇ ÃÖÀú±Ý¸®·ÎÃÖ°í±Ý¾×À»¹ÞÀ»¼öÀִ·м­ºñ½º!
From: ±ÝÀ¶Á¤º¸ @ 2005-08-13  3:30 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 884 bytes --]

^ permalink raw reply

* Remember the old days?
From: Ed Hester @ 2005-08-13  3:46 UTC (permalink / raw)
  To: netdev, netdev-bounce

Hi there,

Try this special product, Cialis Soft Tabs. We have millions
of happy customers all around the world. You will get the perfect
feeling of being a man again!

Cialis Soft Tabs is the impotence treatment drug that everyone
is talking about. Cialis acts up to 36 hours, compare this to
only two or three hours of Viagra action! The active ingredient is
Tadalafil, same as in brand Cialis.

Simply dissolve half a pill under your tongue, 10 min before
intercourse for the best erections you've ever had! Cialis also
have less sidebacks (you can drive or mix alcohol drinks with
them). No prior prescription is needed.

 * Save up to 80% compared to the pharmacies.
 * Worldwide shipping
 * Impress your woman today!

You can get it at: http://deanships.com/soft/





World RX Direct can bring you quality Generic Drugs for a
fraction of the cost of the expensive Brand Name equivalents.
Order our Tadalafil pills today and save 80%. We ship worldwide,
and currently supply to over 1 million customers globally! We
always strive to bring you the cheapest prices.

No thanks: http://deanships.com/rr.php

^ permalink raw reply

* (no subject)
From: y5834i4926v @ 2005-08-13  3:52 UTC (permalink / raw)




^ permalink raw reply

* ¡ß ºñ¾Æ±×¶ó , ½Ã¾Ë¸®½º Á¤Ç° !! ¡Ý ¿©¼ºÈïºÐÁ¦..ÆÇ¸Å.!!
From: Rowena Irvin @ 2005-08-13  4:38 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 957 bytes --]

^ permalink raw reply

* ÀüÈ­·Î ÇÏ´Â"¿µ¾îȸȭ" ¸ÅÀÏ10ºÐ¾¿ 1ÁÖÀϹ«·áüÇèÇØº¸¼¼¿ä~~
From: ÃÖÈñ¶õ @ 2005-08-13  4:53 UTC (permalink / raw)
  To: cvs

[-- Attachment #1: Type: text/html, Size: 2635 bytes --]

^ permalink raw reply

* µî±³¾øÀÌ ÃִܱⰣ4³âÁ¦ ÇлçÇÐÀ§ÃëµæÇÒ¼öÀÖ½À´Ï´Ù.
From: ÇÐÀ§¹ðÅ© @ 2005-08-13  5:09 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 1556 bytes --]

^ permalink raw reply

* ¢Å¹«·á¿Â¶óÀÎÇлçÇÐÀ§ ÀÚ·á¹Þ±â...!!b6
From: Kelsey Christie @ 2005-08-13  5:23 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 929 bytes --]

^ permalink raw reply

* ¢ÀÆ®·¹À̴׺¹ ¼¼Æ®³ë¸¶Áø ~! (À½À̿°ǰ­¸ñ°ÉÀÌÆÈÂƮ+·Î¶Ç)
From: ³ë¸¶Áø @ 2005-08-13  5:58 UTC (permalink / raw)
  To: kdb

[-- Attachment #1: Type: text/html, Size: 409 bytes --]

^ permalink raw reply

* ÆÐ¼Ç Ãò¸®´× ÀÌÁ¤µ·µÇ¾ßÁö~
From: Clint Kirby @ 2005-08-13  6:10 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 436 bytes --]

^ permalink raw reply

* ¤¾¤¾¤¾ prwesnreeonxk
From: À̹οµ @ 2005-08-13  6:20 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/html, Size: 4917 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox