[PATCH] Make `nosendip' behavior more insistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux