提交 11addc80 编写于 作者: G Guillaume Nault 提交者: Dmitry Kozlov

ipcp: reject *-NBNS-Address if we have no value to propose

If wins_opt->addr is NULL, then we have no address to propose (none
defined in accel-ppp.conf and none provided by RADIUS). Currently,
in that case, accel-ppp accepts and acks the address found in the peer's
configuration request. But the peer would normally use the undefined IP
address, so if we ack it, we explicitely tell the peer that 0.0.0.0 is
the primary/secondary NBNS server.
If the peer already knows a NBNS server IP address, it doesn't have to
negociate it with accel-ppp. It can just use it directly, after it
retrieved its own IP address. Therefore there is no need for accel-ppp
to blindly accept addresses proposed by the peer.

This patch rejects *-NBNS-Address if accel-ppp has no NBNS server to
propose, making it explicit to the peer that its request can't be
satisfied.
Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
上级 c3710b6b
......@@ -102,10 +102,8 @@ static int wins_recv_conf_req(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *opt
if (opt32->hdr.len != 6)
return IPCP_OPT_REJ;
if (!wins_opt->addr) {
wins_opt->addr = opt32->val;
return IPCP_OPT_ACK;
}
if (!wins_opt->addr)
return IPCP_OPT_REJ;
if (wins_opt->addr == opt32->val)
return IPCP_OPT_ACK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册