diff options
-rw-r--r-- | share/man/man4/sppp.4 | 10 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 9 |
2 files changed, 15 insertions, 4 deletions
diff --git a/share/man/man4/sppp.4 b/share/man/man4/sppp.4 index 1451f9c..b0d0f18 100644 --- a/share/man/man4/sppp.4 +++ b/share/man/man4/sppp.4 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: sppp.4,v 1.2 1997/09/29 10:10:21 wosch Exp $ +.\" $Id: sppp.4,v 1.3 1997/10/11 11:27:25 joerg Exp $ .\" .Dd May 19, 1997 .Dt SPPP 4 @@ -119,6 +119,14 @@ way the IPCP option negotiation works, this address is being supplied late during the negotiation, which might cause the remote peer to make wrong assumptions. .Pp +In a similar spirit the remote address can be set to the magical +value 0.0.0.1 which means that we don't care what address the remote +side will use, as long as it is not 0.0.0.0. +This is useful if your ISP has several dial-in +servers. You can of course +.Ic route add something or other 0.0.0.1 +and it will do exactly what you would want it to. +.Pp The PAP and CHAP authentication protocols as described in RFC 1334, and RFC 1994 resp., are also implemented. Their parameters are being controlled by the diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index b457947..87d3eb8 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -17,7 +17,7 @@ * * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 * - * $Id: if_spppsubr.c,v 1.31 1998/01/08 23:41:31 eivind Exp $ + * $Id: if_spppsubr.c,v 1.32 1998/02/09 06:09:57 eivind Exp $ */ #include "opt_inet.h" @@ -2502,15 +2502,18 @@ sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len) case IPCP_OPT_ADDRESS: desiredaddr = p[2] << 24 | p[3] << 16 | p[4] << 8 | p[5]; - if (desiredaddr == hisaddr) { + if (desiredaddr == hisaddr || + (hisaddr == 1 && desiredaddr != 0) { /* * Peer's address is same as our value, + * or we have set it to 0.0.0.1 to + * indicate that we do not really care, * this is agreeable. Gonna conf-ack * it. */ if (debug) addlog("%s [ack] ", - sppp_dotted_quad(hisaddr)); + sppp_dotted_quad(desiredaddr)); /* record that we've seen it already */ sp->ipcp.flags |= IPCP_HISADDR_SEEN; continue; |