diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-06-30 11:20:44 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-10-16 21:12:22 +0100 |
commit | d870e171ac1efb601c8626b43a6fbfd8092377d4 (patch) | |
tree | 3738cfb35b09863613eb38500701cf7f0086c722 | |
parent | 530b95942932d5cfa2cd1922208ad894496f8093 (diff) |
Check for getifaddr returning a null broadcast address
http://cygwin.com/ml/cygwin-xfree/2009-06/msg00071.html
It seems that the (new for Cygwin 1.7) getifaddr() function can return
interfaces with IFF_BROADCAST & IFF_UP set, but no broadcast address,
which the X server assumes never happens.
-rw-r--r-- | os/access.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/access.c b/os/access.c index 8c5b50af0..2a171fa70 100644 --- a/os/access.c +++ b/os/access.c @@ -811,7 +811,8 @@ DefineSelf (int fd) continue; #endif if ((ifr->ifa_flags & IFF_BROADCAST) && - (ifr->ifa_flags & IFF_UP)) + (ifr->ifa_flags & IFF_UP) && + ifr->ifa_broadaddr) broad_addr = *ifr->ifa_broadaddr; else continue; |