summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2007-03-11 16:30:49 +0000
committerdwmalone <dwmalone@FreeBSD.org>2007-03-11 16:30:49 +0000
commit8355c667d5270a72a500fdd281ef01faca0fa571 (patch)
tree46540ed71613b495b69cbe58ca40fb53609835be /usr.sbin/inetd/inetd.c
parentf217700440cd891eafe6b538a851069d47a33658 (diff)
downloadFreeBSD-src-8355c667d5270a72a500fdd281ef01faca0fa571.zip
FreeBSD-src-8355c667d5270a72a500fdd281ef01faca0fa571.tar.gz
Don't try to apply connection-per-ip rate limiting to unix domain
sockets. Instead of rejecting all unix domain connections when the -C flag is given, allow them instead. Aragon tested an earlier version of the patch. PR: 109315 MFC after: 2 weeks Tested-by: Aragon Gouveia <aragon@phat.za.net>
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 96400e0..6032462 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -2222,6 +2222,7 @@ cpmip(const struct servtab *sep, int ctrl)
*/
if (sep->se_maxcpm > 0 &&
+ (sep->se_family == AF_INET || sep->se_family == AF_INET6) &&
getpeername(ctrl, (struct sockaddr *)&rss, &rssLen) == 0 ) {
time_t t = time(NULL);
int hv = 0xABC3D20F;
OpenPOWER on IntegriCloud