1 Feb 2010 13:59
[PATCH] Make `nosendip' behavior more insistent
Libor Pechacek <lpechacek <at> suse.cz>
2010-02-01 12:59:45 GMT
2010-02-01 12:59:45 GMT
Hi,
Recently I was testing scenario where the remote end refuses to provide its IP
address. I found out there is a pppd option for this purpose, however it works
reliably only in case the local pppd uses `noremoteip'. If you don't specify
`noremoteip' on the local end, the remote end will reveal its IP address
despite it has been disabled with `nosendip'.
This patch makes pppd never send the local IP address when `nosendip' is
specified.
Libor Pechacek
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
<at> <at> -1004,6 +1004,7 <at> <at> ipcp_nakci(f, p, len, treat_as_reject)
int treat_as_reject;
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
+ ipcp_options *wo = &ipcp_wantoptions[f->unit];
u_char cimaxslotindex, cicflag;
u_char citype, cilen, *next;
u_short cishort;
<at> <at> -1193,7 +1194,7 <at> <at> ipcp_nakci(f, p, len, treat_as_reject)
ciaddr1 = htonl(l);
if (ciaddr1 && go->accept_local)
try.ouraddr = ciaddr1;
- if (try.ouraddr != 0)
+ if (wo->neg_addr && try.ouraddr != 0)
try.neg_addr = 1;
(Continue reading)
RSS Feed