The NetBSD Project

CVS log for src/usr.sbin/inetd/parse.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.sbin / inetd

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:28:50 2026 UTC (11 days, 12 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +33 -2 lines
Sync with HEAD

Revision 1.5.6.1: download - view: text, markup, annotated - select for diffs
Mon May 18 16:58:49 2026 UTC (5 months, 4 weeks ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +33 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #290):

	usr.sbin/inetd/inetd.h: revision 1.7
	usr.sbin/inetd/inetd.h: revision 1.8
	usr.sbin/inetd/inetd.c: revision 1.142
	tests/usr.sbin/inetd/Makefile: revision 1.3
	usr.sbin/inetd/parse_v2.c: revision 1.8
	usr.sbin/inetd/inetd.8: revision 1.69
	tests/usr.sbin/inetd/t_accept_max.sh: revision 1.1
	tests/usr.sbin/inetd/t_accept_max.sh: revision 1.2
	distrib/sets/lists/tests/mi: revision 1.1418
	usr.sbin/inetd/parse.c: revision 1.6

	(all via patch)

Fix various typos in comments.

Add an optional accept limit to stream/nowait services.
Old syntax:
           socket-type[,accept-max][:accept-filter]
New syntax adds the option:
     accept_max    Equivalent to accept-max in positional notation.
accept_max is a positive integer. inetd will stop accepting new
connections for a service, when the number of running and
waited for instances reaches that number. Further connection
attempts will be queued by the kernel and eventually time
out.

The limit acts in parallel to the wait maximum (default 40). If
you want more than 40 instances being spawned, you also need to
adjust the wait maximum to a higher value.

inetd(8): Add a test case for accept-max.
PR bin/59645: inetd `rate-limiting' algorithm is stupid

inetd(8): Fix some tyupos in previous.
PR bin/59645: inetd `rate-limiting' algorithm is stupid

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Dec 27 08:06:38 2025 UTC (10 months, 2 weeks ago) by mlelstv
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +33 -2 lines
Add an optional accept limit to stream/nowait services.

Old syntax:

           socket-type[,accept-max][:accept-filter]

New syntax adds the option:

     accept_max    Equivalent to accept-max in positional notation.

accept_max is a positive integer. inetd will stop accepting new
connections for a service, when the number of running and
waited for instances reaches that number. Further connection
attempts will be queued by the kernel and eventually time
out.

The limit acts in parallel to the wait maximum (default 40). If
you want more than 40 instances being spawned, you also need to
adjust the wait maximum to a higher value.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Aug 10 08:37:53 2022 UTC (4 years, 3 months ago) by christos
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, perseant-exfatfs-base-20240630, perseant-exfatfs-base, netbsd-11-base, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Branch point for: perseant-exfatfs, netbsd-11
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -6 lines
PR/56963: Mark Davies: inetd not configured for rpc
Move RPC includes to inetd.h

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Aug 10 03:35:38 2022 UTC (4 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +7 -3 lines
PR bin/56963 Mark Davies: inetd not configured for rpc

Instead of using negative flags to turn on positive flags, set -DRPC
in the makefile. Corrects a problem where the SunRPC code in parse.c
was accidentally left disabled.

This is a prime example of why we don't like negative flags...

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun May 22 11:27:37 2022 UTC (4 years, 5 months ago) by andvar
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
fix various small typos, mainly in comments.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Oct 12 22:51:28 2021 UTC (5 years, 1 month ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -5 lines
inetd: remove trailing whitespace, add space after 'if' and 'for'

No functional change.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Oct 12 19:08:04 2021 UTC (5 years, 1 month ago) by christos
Branches: MAIN
PR/56448: Solomon Ritzow: Various improvements.

Rate limiting code has been moved to ratelimit.c. I renamed
clear_ip_list to rl_clear_ip_list and broke the code up into more
functions. I have also made the per-IP rate limiting allocation more
efficient. IP addresses are now stored in their network format instead
of a string from getnameinfo (see inetd.h struct rl_ip_node). malloc
calls use only the space needed by the structure by using offsetof on
union members (I suppose this can be a bit dangerous if not done
correctly...). Per-IP rate limiting still supports textual comparison
using getnameinfo for address families other than AF_INET and AF_INET6, but I
don't think there are any that are actually compatible or used by inetd (I
haven't tested UNIX sockets with a remote bound to another file, but I did test
using IPv6 with the textual format by commenting out the IPv6 specific
code, and it works properly). Still potentially handy for the future.
The IP node list (se_rl_ip_list) now uses the <sys/queue.h> SLIST macros
instead of a custom list. I've broken rl_process up into helper functions
for each type of rate limiting and created a separate function for
address stringification, for use with printouts from the -d flag. I
tried to reduce stack memory use by moving printing code involving
string buffers into separate functions. I haven't tested rl_ipv6_eq on
a 32-bit system.

The code for the positional syntax has also been moved to parse.c.
Function try_biltin has been added to remove parse.c:parse_server's
dependency on the biltin structure definition.

File inetd.h has been updated with the proper function prototypes, and
the servtab structure has been update with the new IP node SLIST. I also
moved things around a bit. The way we (a peer and myself)
formatted inetd.h previously was somewhat confusing. Function and global
variable prototypes are now organized by the source file they are
defined in.

I also added a -f flag that I saw in another problem report
(https://gnats.netbsd.org/12823) that I thought could be useful. It
runs inetd in the foreground but without debug printouts or SO_DEBUG.
I'm not completely sure about the line "if (foreground) setsid()" that
I changed from "if (debug) setsid()".

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>