Date: Mon, 8 Jun 2009 03:15:27 +0000 (UTC) From: Alexander Kabaev <kan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193674 - head/usr.sbin/mountd Message-ID: <200906080315.n583FRSG014055@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kan Date: Mon Jun 8 03:15:27 2009 New Revision: 193674 URL: http://svn.freebsd.org/changeset/base/193674 Log: The change r192913 has added dependency on IP_RECVDSTADDR being set for RPC UDP sockets. Mountd uses internal libc fuctions directly and bypasses generic socket initialization completely, so we need to set IP_RECVDSTADDR here to match the libc behavior. Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Mon Jun 8 02:13:24 2009 (r193673) +++ head/usr.sbin/mountd/mountd.c Mon Jun 8 03:15:27 2009 (r193674) @@ -568,6 +568,13 @@ create_service(struct netconfig *nconf) continue; } } + if (si.si_socktype == SOCK_DGRAM && + setsockopt(fd, IPPROTO_IP, IP_RECVDSTADDR, &one, + sizeof one) < 0) { + syslog(LOG_ERR, + "can't disable v4-in-v6 on IPv6 socket"); + exit(1); + } break; case AF_INET6: if (inet_pton(AF_INET6, hosts[nhostsbak],
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906080315.n583FRSG014055>