diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-02-15 16:38:39 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-02-15 16:38:39 +0300 |
commit | 954b4dd6a27b6a11d809ad2fc4239a5558db10f8 (patch) | |
tree | a50b633aa7c0b6393cc224ba60d131507f5783f6 /accel-pppd | |
parent | af82c18fe8985b706740614d5ed738026ae68878 (diff) | |
download | accel-ppp-954b4dd6a27b6a11d809ad2fc4239a5558db10f8.tar.gz accel-ppp-954b4dd6a27b6a11d809ad2fc4239a5558db10f8.zip |
ipoe: fixed conditions to turn on arp handling
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 1e84b07..ab2cb00 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -2713,6 +2713,9 @@ static void add_interface(const char *ifname, int ifindex, const char *opt, int } } + if (!opt_arp && opt_up && opt_mode == MODE_L2) + opt_arp = 1; + if (!opt_up && !opt_dhcpv4 && !opt_auto) { opt_up = conf_up; opt_dhcpv4 = conf_dhcpv4; @@ -2775,10 +2778,10 @@ static void add_interface(const char *ifname, int ifindex, const char *opt, int if (!serv->dhcpv4_relay && serv->opt_dhcpv4 && opt_relay) serv->dhcpv4_relay = dhcpv4_relay_create(opt_relay, opt_giaddr, &serv->ctx, (triton_event_func)ipoe_recv_dhcpv4_relay); - if (serv->arp && !opt_arp && !opt_up) { + if (serv->arp && !opt_arp) { arpd_stop(serv->arp); serv->arp = NULL; - } else if (!serv->arp && (opt_arp || opt_up)) + } else if (!serv->arp && opt_arp) serv->arp = arpd_start(serv); serv->opt_up = opt_up; |