On 2002-06-20 20:25 +0000, Terry Lambert wrote:
> Giorgos Keramidas wrote:
> > I've been thinking for quite some time to add per-client-IP limiting
> > to ftpd, and I had almost decided upon something like the following,
> > where each child of ftpd has two numbers associated with it.
>
> Someone just did something similar for inetd (per IP per port).
I know. I missed that post (probably deleted it accidentally), and a
friend told me that this was being discussed. Since I had been giving
the topic a big of thought, I thought I'd post what I had and ask for
comments. The friend who notified me about this mentioned that a
linear list was being used and what I had so far would probably be OK
for inetd too.
> The more I think about this, and the fact that there is code growing
> to do basically the same thing in every program, the more I think
> that the code to do this needs to be centralized.
A simple core reuse of ../../foo.c would probably be sufficient in
this case, since the part that does the limiting only needs the
following interface:
find_client_addr();
find_client_pid();
add_client(addr, pid);
del_client(pid); /* called by reapchild() */
> Putting this code into a seperate daemon, or even natd, makes a
> lot more sense to me than hacking up the kernel, or every network
> application ever written.
Sound very general to me, and I can't say I don't like the idea.
- Giorgos
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message