summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/ipoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.c')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 09bd8873..46c5372f 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)