[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/3] Check for ARPHRD_ETHER and ARPHRD_SLIP types in getDevices (#596826)



In the getDevices() function in isys, we check the type of the device
during discovery to see if the type is ARPHRD_ETHER.  If it isn't, we
skip that device when gathering network devices.  This filters out lo,
sit0, and other devices we don't want in the network device list.  But,
it does skip over one ethernet device type that is initialized as
ARPHRD_SLIP on s390.
---
 isys/devices.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/isys/devices.c b/isys/devices.c
index 854017d..2a77ce4 100644
--- a/isys/devices.c
+++ b/isys/devices.c
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <limits.h>
+#include <net/if_arp.h>
 
 #include "devices.h"
 
@@ -171,7 +172,7 @@ storagedone:
                 return NULL;
             }
 
-            if (type != 1)
+            if (type != ARPHRD_ETHER && type != ARPHRD_SLIP)
                 continue;
 
             new = calloc(1, sizeof(struct device));
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]