Ignore loopback interfaces
This commit is contained in:
parent
afc9672b0b
commit
83969876a9
|
@ -277,6 +277,8 @@ struct ifi_info *get_ifi_info(int family, int doaliases)
|
||||||
flags = ifrcopy.ifr_flags;
|
flags = ifrcopy.ifr_flags;
|
||||||
if ((flags & IFF_UP) == 0)
|
if ((flags & IFF_UP) == 0)
|
||||||
continue; /* ignore if interface not up */
|
continue; /* ignore if interface not up */
|
||||||
|
if ((flags & IFF_LOOPBACK))
|
||||||
|
continue; /* ignore loopback interfaces */
|
||||||
|
|
||||||
/* Skip addresses we can't use */
|
/* Skip addresses we can't use */
|
||||||
#ifdef SIOCGIFAFLAG_IN
|
#ifdef SIOCGIFAFLAG_IN
|
||||||
|
|
Loading…
Reference in New Issue