diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2009-07-23 20:47:52 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2009-07-23 20:47:52 +0200 |
commit | dd8844870932f90a54dd12e904d51c450d55898c (patch) | |
tree | 9ecff20d1ba63c33069bf5edaab558c672678330 | |
parent | a86361510c10ac5f19e2959d33e9ffb7f6c5099e (diff) |
Bugfix: Use interface instead of eth_interface in get_ip_addr()
-rw-r--r-- | src/get_ip_addr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/get_ip_addr.c b/src/get_ip_addr.c index c394227..6ddd35a 100644 --- a/src/get_ip_addr.c +++ b/src/get_ip_addr.c @@ -32,17 +32,17 @@ const char *get_ip_addr(const char *interface) { addrp = ifaddr; - /* Skip until we are at the AF_INET address of eth_interface */ + /* Skip until we are at the AF_INET address of interface */ for (addrp = ifaddr; (addrp != NULL && - (strcmp(addrp->ifa_name, eth_interface) != 0 || + (strcmp(addrp->ifa_name, interface) != 0 || addrp->ifa_addr == NULL || addrp->ifa_addr->sa_family != AF_INET)); addrp = addrp->ifa_next) { /* Check if the interface is down */ - if (strcmp(addrp->ifa_name, eth_interface) == 0 && + if (strcmp(addrp->ifa_name, interface) == 0 && (addrp->ifa_flags & IFF_RUNNING) == 0) { freeifaddrs(ifaddr); return NULL; |