diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2013-04-19 15:04:23 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-04-19 15:04:23 +0400 |
commit | 2a2012bec51d58b05f508f0c79819d48392824ea (patch) | |
tree | ed554eb6e6cc8d4020addaad05cb0aa245479300 /accel-pppd/ctrl/ipoe/ipoe.c | |
parent | 65159a74bd8e234f24bff44c267c251a080e1f14 (diff) | |
download | accel-ppp-2a2012bec51d58b05f508f0c79819d48392824ea.tar.gz accel-ppp-2a2012bec51d58b05f508f0c79819d48392824ea.zip |
ipoe: fixed start=dhcpv4,shared=1 mode
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.c')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 09bd887..46c5372 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -582,12 +582,6 @@ static void __ipoe_session_activate(struct ipoe_session *ses) if (ses->terminating) return; - if (!ses->ses.ipv4) { - ses->ses.ipv4 = &ses->ipv4; - ses->ipv4.owner = NULL; - ses->ipv4.peer_addr = ses->yiaddr; - } - if (ses->ifindex != -1) { addr = 0; if (!ses->ses.ipv4) @@ -601,7 +595,14 @@ static void __ipoe_session_activate(struct ipoe_session *ses) } } - if (ses->serv->opt_ifcfg || (ses->serv->opt_mode == MODE_L2)) + if (!ses->ses.ipv4) { + ses->ses.ipv4 = &ses->ipv4; + ses->ipv4.owner = NULL; + ses->ipv4.peer_addr = ses->yiaddr; + ses->ipv4.addr = ses->siaddr; + } + + if (ses->ifindex == -1 && (ses->serv->opt_ifcfg || (ses->serv->opt_mode == MODE_L2))) ipoe_ifcfg_add(ses); if (ses->l4_redirect) |