Make sure to use IPv4 mapped IPv6 address when mapped address is
requested in /etc/inetd.conf. Reviewed by: shin
This commit is contained in:
parent
c244d2de43
commit
612c58996e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58935
@ -1136,11 +1136,12 @@ setsockopt(fd, SOL_SOCKET, opt, (char *)&on, sizeof (on))
|
||||
(char *)&on, sizeof (on)) < 0))
|
||||
syslog(LOG_ERR, "setsockopt (IPV6_RECVPKTINFO): %m");
|
||||
#ifdef IPV6_BINDV6ONLY
|
||||
if ((sep->se_family == AF_INET6) &&
|
||||
(sep->se_nomapped != 0) &&
|
||||
(setsockopt(sep->se_fd, IPPROTO_IPV6, IPV6_BINDV6ONLY,
|
||||
(char *)&on, sizeof (on)) < 0))
|
||||
syslog(LOG_ERR, "setsockopt (IPV6_BINDV6ONLY): %m");
|
||||
if (sep->se_family == AF_INET6) {
|
||||
int flag = sep->se_nomapped ? 1 : 0;
|
||||
if (setsockopt(sep->se_fd, IPPROTO_IPV6, IPV6_BINDV6ONLY,
|
||||
(char *)&flag, sizeof (flag)) < 0)
|
||||
syslog(LOG_ERR, "setsockopt (IPV6_BINDV6ONLY): %m");
|
||||
}
|
||||
#endif /* IPV6_BINDV6ONLY */
|
||||
#undef turnon
|
||||
if (sep->se_type == TTCP_TYPE)
|
||||
|
Loading…
Reference in New Issue
Block a user