* [PATCH] Make `nosendip' behavior more insistent
@ 2010-02-01 12:59 Libor Pechacek
0 siblings, 0 replies; only message in thread
From: Libor Pechacek @ 2010-02-01 12:59 UTC (permalink / raw)
To: linux-ppp
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
@@ -1004,6 +1004,7 @@ 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;
@@ -1193,7 +1194,7 @@ 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;
no.neg_addr = 1;
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-01 12:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01 12:59 [PATCH] Make `nosendip' behavior more insistent Libor Pechacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).