diff options
| author | Roy Marples <roy@marples.name> | 2009-08-05 21:20:53 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-08-05 21:20:53 +0000 |
| commit | a74873aebad463c70fbff15bb4ee6287a109fa47 (patch) | |
| tree | 9029e78984ea3fd3683d29ae3089a94327a54bc4 | |
| parent | 0593a31e53921ac55e6766876369a4d4664e641e (diff) | |
| download | dhcpcd-a74873aebad463c70fbff15bb4ee6287a109fa47.tar.xz | |
Only allow hardware families we know we can work with by default.
If an interface with a different hardware family is requested by the user then
emit a warning.
| -rw-r--r-- | net.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -351,6 +351,18 @@ discover_interfaces(int argc, char * const *argv) if (ifp->hwlen != 0) memcpy(ifp->hwaddr, sll->sll_addr, ifp->hwlen); #endif + + switch(ifp->family) { + case ARPHRD_ETHER: /* FALLTHROUGH */ + case ARPHRD_IEEE1394: + break; + default: + if (argc == 0 && ifac == 0) { + free_interface(ifp); + continue; + } + syslog(LOG_WARNING, "%s: unknown hardware family", p); + } } if (ifl) ifl->next = ifp; |
