diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-11-23 15:37:41 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-11-23 15:37:41 +0000 |
commit | 943c59e3e85d52d7924a91e112a518af4647d311 (patch) | |
tree | 52161a5c426ee44137b7075ef5ae643faf0c1c05 /winsup/cygwin/net.cc | |
parent | 679e4c82f1fc5b69487f84c3f2ed3dcca6f796dd (diff) | |
download | newlib-943c59e3e85d52d7924a91e112a518af4647d311.zip newlib-943c59e3e85d52d7924a91e112a518af4647d311.tar.gz newlib-943c59e3e85d52d7924a91e112a518af4647d311.tar.bz2 |
* autoload.cc (SendARP): Remove.
* net.cc (get_flags): Set IFF_NOARP flag for PPP and SLIP devices.
(get_xp_ifs): Unify IFF_BROADCAST setting. Drop calling SendARP to
set IFF_NOARP flag.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r-- | winsup/cygwin/net.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 50118fe..aa56ad4 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1691,8 +1691,9 @@ get_flags (PIP_ADAPTER_ADDRESSES pap) unsigned int flags = IFF_UP; if (pap->IfType == IF_TYPE_SOFTWARE_LOOPBACK) flags |= IFF_LOOPBACK; - else if (pap->IfType == IF_TYPE_PPP) - flags |= IFF_POINTOPOINT; + else if (pap->IfType == IF_TYPE_PPP + || pap->IfType == IF_TYPE_SLIP) + flags |= IFF_POINTOPOINT | IFF_NOARP; if (!(pap->Flags & IP_ADAPTER_NO_MULTICAST)) flags |= IFF_MULTICAST; if (pap->OperStatus == IfOperStatusUp @@ -1879,7 +1880,8 @@ get_xp_ifs (ULONG family) ifp->ifa_ifa.ifa_name = ifp->ifa_name; /* Flags */ ifp->ifa_ifa.ifa_flags = get_flags (pap); - if (pap->IfType != IF_TYPE_PPP) + if (pap->IfType != IF_TYPE_PPP + && pap->IfType != IF_TYPE_SOFTWARE_LOOPBACK) ifp->ifa_ifa.ifa_flags |= IFF_BROADCAST; /* Address */ ifp->ifa_addr.ss_family = AF_INET; @@ -1927,12 +1929,6 @@ get_xp_ifs (ULONG family) && pap->IfType != IF_TYPE_SOFTWARE_LOOPBACK && pap->IfType != IF_TYPE_PPP) ifp->ifa_ifa.ifa_flags |= IFF_BROADCAST; - if (sa->sa_family == AF_INET) - { - ULONG hwaddr[2], hwlen = 6; - if (SendARP (sin->sin_addr.s_addr, 0, hwaddr, &hwlen)) - ifp->ifa_ifa.ifa_flags |= IFF_NOARP; - } /* Address */ memcpy (&ifp->ifa_addr, sa, sa_size); ifp->ifa_ifa.ifa_addr = (struct sockaddr *) &ifp->ifa_addr; |