gdmchooser/XDMCP:

- fix harmless warning getting logged as CRITICAL when enumerating interfaces
	http://bugzilla.gnome.org/show_bug.cgi?id=544790
 - unbreak XDMCP discovery on the IPv6-mapped IPv4 broadcast address by unsetting
	IPV6_V6ONLY socket option (obtained from NetBSD pkgsrc)
	http://bugzilla.gnome.org/show_bug.cgi?id=544730

Approved by: marcus@
This commit is contained in:
Volker Stolz 2008-07-26 01:20:04 +00:00
parent 3f4b001bcf
commit 2699274773
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217528
2 changed files with 29 additions and 1 deletions

View File

@ -8,6 +8,7 @@
PORTNAME= gdm
PORTVERSION= 2.20.7
PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
@ -45,7 +46,7 @@ GNOME_LOCALSTATEDIR= /var
MAN1= gdm.1
OPTIONS= IPV6 "Enable IPv6 support" on \
OPTIONS= IPV6 "Enable IPv6 support" off \
LOG_LIMIT "Limit ~/.xsession-errors size" on
.include <bsd.port.pre.mk>

View File

@ -0,0 +1,27 @@
$FreeBSD$
--- gui/gdmchooser.c.orig
+++ gui/gdmchooser.c
@@ -727,7 +727,7 @@
/* paranoia */
ifreq.ifr_name[sizeof (ifreq.ifr_name) - 1] = '\0';
- if (ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0)
+ if ((ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0) && (errno != ENXIO))
gdm_common_error ("Could not get SIOCGIFFLAGS for %s", ifr[i].ifr_name);
if ((ifreq.ifr_flags & IFF_UP) == 0 ||
@@ -1123,6 +1123,12 @@
have_ipv6 = FALSE;
else
have_ipv6 = TRUE;
+ /* Net- & FreeBSD default to V6ONLY */
+ {
+ int no = 0;
+ setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &no, sizeof(no));
+ }
+
#endif
if ( ! have_ipv6) {
if ((sockfd = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {