From db98faab0495c752f3318ae8b7c7c6515c3ff1a8 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Wed, 11 Jul 2012 16:10:31 +0400 Subject: ipoe: fix multiple interface loading --- accel-pppd/ctrl/ipoe/ipoe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 2f9cf129..a24ce949 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -655,6 +655,8 @@ void ipoe_recv_up(int ifindex, struct ethhdr *eth, struct iphdr *iph) pthread_mutex_unlock(&serv->lock); ipoe_session_create_up(serv, eth, iph); + + break; } } @@ -793,7 +795,7 @@ static void add_interface(const char *ifname, int ifindex, const char *opt) } list_for_each_entry(serv, &serv_list, entry) { - if (!strcmp(ifname, serv->ifname)) + if (strcmp(ifname, serv->ifname)) continue; serv->active = 1; @@ -876,7 +878,7 @@ static int __load_interface_re(int index, int flags, const char *name, struct ip { if (pcre_exec(arg->re, NULL, name, strlen(name), 0, 0, NULL, 0) < 0) return 0; - + add_interface(name, index, arg->opt); return 0; -- cgit v1.2.3