diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-17 16:27:50 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-17 16:27:50 +0300 |
commit | 3f4beaca9bcea35ffeff810f068487dd449cc2cb (patch) | |
tree | 226f8345e61b2bbbee3e0e52faf17b0bc7f4c76f /accel-pppd/ctrl | |
parent | ea7f988b40c03a21571143be30200f77450f3ba4 (diff) | |
download | accel-ppp-3f4beaca9bcea35ffeff810f068487dd449cc2cb.tar.gz accel-ppp-3f4beaca9bcea35ffeff810f068487dd449cc2cb.zip |
ipoe: log warn if interface was not started by vlan_mon notification
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 1e3c04c..9d3890d 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -2217,11 +2217,11 @@ void ipoe_vlan_mon_notify(int ifindex, int vid) return; } + log_info2("ipoe: create vlan %s parent %s\n", ifname, ifr.ifr_name); + if (iplink_vlan_add(ifname, ifindex, vid)) return; - log_info2("ipoe: create vlan %s parent %s\n", ifname, ifr.ifr_name); - len = strlen(ifname); memcpy(ifr.ifr_name, ifname, len + 1); @@ -2234,7 +2234,6 @@ void ipoe_vlan_mon_notify(int ifindex, int vid) return; } - list_for_each_entry(opt, §->items, entry) { if (strcmp(opt->name, "interface")) continue; @@ -2264,9 +2263,14 @@ void ipoe_vlan_mon_notify(int ifindex, int vid) continue; add_interface(ifname, ifr.ifr_ifindex, opt->val, ifindex, vid); - } else if (ptr - opt->val == len && memcmp(opt->val, ifname, len) == 0) + return; + } else if (ptr - opt->val == len && memcmp(opt->val, ifname, len) == 0) { add_interface(ifname, ifr.ifr_ifindex, opt->val, ifindex, vid); + return; + } } + + log_warn("ipoe: vlan %s not started\n", ifname); } static void ipoe_serv_timeout(struct triton_timer_t *t) |