summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2011-08-29 01:17:25 +0400
committerKozlov Dmitry <xeb@mail.ru>2011-08-29 01:17:25 +0400
commit6c6e40184caef7a4d11ee5b0fa23cef8166072f2 (patch)
tree3a7fa80d02dd04fa9da8567981f9dbb91f202e28
parentc4c6ceed2b0f973022fc429a7e709c057c95e9dc (diff)
downloadaccel-ppp-6c6e40184caef7a4d11ee5b0fa23cef8166072f2.tar.gz
accel-ppp-6c6e40184caef7a4d11ee5b0fa23cef8166072f2.zip
ppp: ipv6cp: fix initial ConfReq interface-id handling
-rw-r--r--accel-pppd/ppp/ipv6cp_opt_intfid.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/accel-pppd/ppp/ipv6cp_opt_intfid.c b/accel-pppd/ppp/ipv6cp_opt_intfid.c
index 389880a..561d1e8 100644
--- a/accel-pppd/ppp/ipv6cp_opt_intfid.c
+++ b/accel-pppd/ppp/ipv6cp_opt_intfid.c
@@ -231,16 +231,17 @@ static int ipaddr_recv_conf_req(struct ppp_ipv6cp_t *ipv6cp, struct ipv6cp_optio
if (conf_accept_peer_intf_id && opt64->val)
ipv6cp->ppp->ipv6->peer_intf_id = opt64->val;
+ else if (!ipv6cp->ppp->ipv6->peer_intf_id) {
+ ipv6cp->ppp->ipv6->peer_intf_id = generate_peer_intf_id(ipv6cp->ppp);
+ if (!ipv6cp->ppp->ipv6->peer_intf_id)
+ return IPV6CP_OPT_TERMACK;
+ }
if (opt64->val && ipv6cp->ppp->ipv6->peer_intf_id == opt64->val && opt64->val != ipv6cp->ppp->ipv6->intf_id) {
ipv6cp->delay_ack = ccp_ipcp_started(ipv6cp->ppp);
goto ack;
}
- ipv6cp->ppp->ipv6->peer_intf_id = generate_peer_intf_id(ipv6cp->ppp);
- if (!ipv6cp->ppp->ipv6->peer_intf_id)
- return IPV6CP_OPT_TERMACK;
-
return IPV6CP_OPT_NAK;
ack: