niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
[CFR] max-child-per-ip restriction for inetd
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
Hajimu UMEMOTO
*nix forums beginner


Joined: 16 Jun 2002
Posts: 46

PostPosted: Sun Jun 16, 2002 12:17 pm    Post subject: [CFR] max-child-per-ip restriction for inetd Reply with quote

Hi,

I wish to add max-child-per-ip option to inetd. This enables us to
restrict maximum number of simultaneous invocations of each service
from a single IP address. The proposed patch can be found from:

http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-5c.diff (for 5-CURRENT)
http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-4s.diff (for 4-STABLE)

If there is no objection, I'll commit it at next weekend.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Makoto Matsushita
*nix forums beginner


Joined: 21 Mar 2002
Posts: 9

PostPosted: Sun Jun 16, 2002 12:35 pm    Post subject: Re: [CFR] max-child-per-ip restriction for inetd Reply with quote

ume> I wish to add max-child-per-ip option to inetd. This enables us to
ume> restrict maximum number of simultaneous invocations of each service
ume> from a single IP address.

FYI: This patch is already tested at snapshots.jp.FreeBSD.org, and it
seems fine to me. Thank you, ume-san!

-- -
Makoto `MAR' Matsushita

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Hajimu UMEMOTO
*nix forums beginner


Joined: 16 Jun 2002
Posts: 46

PostPosted: Sun Jun 16, 2002 3:49 pm    Post subject: Re: [CFR] max-child-per-ip restriction for inetd Reply with quote

Hi,

Quote:
On Sun, 16 Jun 2002 19:36:28 +0200 (SAT)
John Hay <jhay@icomtek.csir.co.za> said:

jhay> Both the patches needs a colon (Smile after the s on the getopt() line,
jhay> otherwise you just get a nasty coredump if you try to use the "-s num"
jhay> commandline option.

Oops, thanks. I just fix it and re-put it.

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
John Hay
*nix forums beginner


Joined: 17 Apr 2002
Posts: 8

PostPosted: Sun Jun 16, 2002 5:36 pm    Post subject: Re: [CFR] max-child-per-ip restriction for inetd Reply with quote

Quote:
Hi,

I wish to add max-child-per-ip option to inetd. This enables us to
restrict maximum number of simultaneous invocations of each service
from a single IP address. The proposed patch can be found from:

http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-5c.diff (for 5-CURRENT)
http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-4s.diff (for 4-STABLE)

Both the patches needs a colon (Smile after the s on the getopt() line,
otherwise you just get a nasty coredump if you try to use the "-s num"
commandline option.

John
--
John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Terry Lambert
*nix forums Guru


Joined: 19 Mar 2002
Posts: 434

PostPosted: Sun Jun 16, 2002 8:51 pm    Post subject: Re: [CFR] max-child-per-ip restriction for inetd Reply with quote

Hajimu UMEMOTO wrote:
Quote:
I wish to add max-child-per-ip option to inetd. This enables us to
restrict maximum number of simultaneous invocations of each service
from a single IP address. The proposed patch can be found from:

http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-5c.diff (for 5-CURRENT)
http://www.imasy.or.jp/~ume/FreeBSD/inetd-perip-4s.diff (for 4-STABLE)

If there is no objection, I'll commit it at next weekend.


Your search_ip() function is a linear list traversal, which
makes a lookup O(N).

Is there any change you could use a hash or a btree or a
skiplist or a trie or some other data structure *other*
than a linear list traversal?

It seems to me that this will make things incredibly slow
for everyone, if you have one IP address that's abusive
enough that it approaches the limit you set.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Hajimu UMEMOTO
*nix forums beginner


Joined: 16 Jun 2002
Posts: 46

PostPosted: Mon Jun 17, 2002 2:20 pm    Post subject: Re: [CFR] max-child-per-ip restriction for inetd Reply with quote

Hi,

Quote:
On Sun, 16 Jun 2002 15:51:31 -0700
Terry Lambert <tlambert2@mindspring.com> said:

tlambert2> Your search_ip() function is a linear list traversal, which
tlambert2> makes a lookup O(N).

Oh, yes. I'm thinking that at begining.

tlambert2> Is there any change you could use a hash or a btree or a
tlambert2> skiplist or a trie or some other data structure *other*
tlambert2> than a linear list traversal?

Yes, I have a plan to reimplement it to use maybe btree or something.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 5:26 am | All times are GMT
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts recipient address restriction 3dd13 Postfix 0 Wed Mar 26, 2008 1:46 pm
No new posts Postfix sending Restriction of mails per user based Yadavendra Awasthi Postfix 5 Thu Jul 20, 2006 7:51 am
No new posts Restriction classes: implied rules and process flow Darren Postfix 4 Sat Jul 15, 2006 10:34 pm
No new posts /etc/inetd.conf ??? michanux networking 1 Sat Jul 15, 2006 7:34 pm
No new posts Map of Parent Type and calling child type copy constructo... Brandt Dusthimer C++ 2 Wed Jul 12, 2006 7:53 pm

Loan | Ringtones | Secured Loans | Modded Xbox | Notebook Deals
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1133s ][ Queries: 16 (0.0295s) ][ GZIP on - Debug on ]