svn commit: r287997 - head/usr.sbin/inetd
Hiroki Sato
hrs at FreeBSD.org
Sat Sep 19 23:27:23 UTC 2015
Author: hrs
Date: Sat Sep 19 23:27:22 2015
New Revision: 287997
URL: https://svnweb.freebsd.org/changeset/base/287997
Log:
- Fix a crash on a rpc entry when an IPv6 address is explicitly specified
in -a flag.
- Fix a bug that sockaddr_in was used where sockaddr_in6 should have
been used. This was not actually harmful because offsetof(struct
sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6,
sin6_port).
MFC after: 1 day
Modified:
head/usr.sbin/inetd/inetd.c
Modified: head/usr.sbin/inetd/inetd.c
==============================================================================
--- head/usr.sbin/inetd/inetd.c Sat Sep 19 20:27:09 2015 (r287996)
+++ head/usr.sbin/inetd/inetd.c Sat Sep 19 23:27:22 2015 (r287997)
@@ -1752,8 +1752,6 @@ more:
memmove(sep->se_proto, sep->se_proto + 4,
strlen(sep->se_proto) + 1 - 4);
sep->se_rpc = 1;
- memcpy(&sep->se_ctrladdr4, bind_sa4,
- sizeof(sep->se_ctrladdr4));
sep->se_rpc_prog = sep->se_rpc_lowvers =
sep->se_rpc_highvers = 0;
if ((versp = strrchr(sep->se_service, '/'))) {
@@ -2130,8 +2128,8 @@ check_loop(const struct sockaddr *sa, co
continue;
#ifdef INET6
case AF_INET6:
- if (((const struct sockaddr_in *)sa)->sin_port ==
- se2->se_ctrladdr4.sin_port)
+ if (((const struct sockaddr_in6 *)sa)->sin6_port ==
+ se2->se_ctrladdr6.sin6_port)
goto isloop;
continue;
#endif
More information about the svn-src-head
mailing list