Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Apr 2008 00:34:35 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 139175 for review
Message-ID:  <200804020034.m320YZml024248@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=139175

Change 139175 by sam@sam_ebb on 2008/04/02 00:33:34

	preserve ifr_flagshigh when futzing with the ifnet flags
	Submitted by:	Alexey Popov <lol@chistydom.ru>

Affected files ...

.. //depot/projects/vap/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c#8 edit

Differences ...

==== //depot/projects/vap/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c#8 (text+ko) ====

@@ -134,7 +134,7 @@
 		perror("SIOCGIFFLAGS");
 		return errno;
 	}
-	*flags = ifr.ifr_flags & 0xffff;
+	*flags = (ifr.ifr_flags & 0xffff) | (ifr.ifr_flagshigh << 16);
 	return 0;
 }
 
@@ -146,6 +146,7 @@
 	memset(&ifr, 0, sizeof(ifr));
 	strncpy(ifr.ifr_name, drv->ifname, sizeof (ifr.ifr_name));
 	ifr.ifr_flags = flags & 0xffff;
+	ifr.ifr_flagshigh = flags >> 16;
 	if (ioctl(drv->sock, SIOCSIFFLAGS, (caddr_t)&ifr) < 0) {
 		perror("SIOCSIFFLAGS");
 		return errno;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804020034.m320YZml024248>