net server: IPv6, look at nic flags vs name for loop
This commit is contained in:
@@ -849,10 +849,6 @@ NetServer::_BringUpInterfaces()
|
|||||||
void
|
void
|
||||||
NetServer::_ConfigureIPv6LinkLocal(const char* name)
|
NetServer::_ConfigureIPv6LinkLocal(const char* name)
|
||||||
{
|
{
|
||||||
// Don't touch the loopback device
|
|
||||||
if (!strncmp(name, "loop", 4))
|
|
||||||
return;
|
|
||||||
|
|
||||||
int socket = ::socket(AF_INET6, SOCK_DGRAM, 0);
|
int socket = ::socket(AF_INET6, SOCK_DGRAM, 0);
|
||||||
if (socket < 0) {
|
if (socket < 0) {
|
||||||
// No ipv6 support, skip
|
// No ipv6 support, skip
|
||||||
@@ -861,6 +857,11 @@ NetServer::_ConfigureIPv6LinkLocal(const char* name)
|
|||||||
close(socket);
|
close(socket);
|
||||||
|
|
||||||
BNetworkInterface interface(name);
|
BNetworkInterface interface(name);
|
||||||
|
|
||||||
|
// Don't touch the loopback device
|
||||||
|
if ((interface.Flags() & IFF_LOOPBACK) != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
BNetworkAddress link;
|
BNetworkAddress link;
|
||||||
status_t result = interface.GetHardwareAddress(link);
|
status_t result = interface.GetHardwareAddress(link);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user