This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: ioctl(SIOCGIFFLAGS) uses the interface address instead of name?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Cc: Gilles Courcoux <Gilles dot Courcoux at col dot bsf dot alcatel dot fr>
- Date: Thu, 7 Nov 2002 11:27:21 +0100
- Subject: Re: ioctl(SIOCGIFFLAGS) uses the interface address instead of name?
- References: <20021016160516.GA17962@redhat.com>
- Reply-to: cygwin at cygwin dot com
On Wed, 16 Oct 2002 15:09:24 +0200 (MEST), Gilles Courcoux <Gilles.Courcoux@col.bsf.alcatel.fr> wrote:
> I would thus propose this modification to fhandler_socket.cc (change that
> shouldn't break applications relying on the until-now cygwin behavior) :
>
> --- fhandler_socket.cc Sat Jul 6 08:05:32 2002
> +++ fhandler_socket.cc.new Thu Oct 10 19:05:33 2002
> @@ -996,7 +996,8 @@
> return -1;
> }
> ifr->ifr_flags = IFF_NOTRAILERS | IFF_UP | IFF_RUNNING;
> - if (ntohl (((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr)
> + if ((! strncmp(ifr->ifr_name, "lo", 2))
> + || ntohl (((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr)
> == INADDR_LOOPBACK)
> ifr->ifr_flags |= IFF_LOOPBACK;
> else
Thanks for that patch! Applied.
Corinna
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/