Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 1997 10:09:50 +0900
From:      NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
To:        bugs@freebsd.org
Subject:   patch for IPCP/PPP
Message-ID:  <19970510100950F.motonori@econ.kyoto-u.ac.jp>

next in thread | raw e-mail | index | archive | help

Hello,

I'm using "ppp" distributed in FreeBSD on BSD/OS environment and
I have a trouble in IPCP/PPP negotiation.

In my environment, I'd like to be configuration free on IP address
and hope both IP addresses (client-side and server-side) are
provided from the server side. But some (e.g. YAMAHA RT100i) server
does not provide IP address of server-side at first time and
the "ppp" software accepts 0.0.0.0 straightforwardly...

In a Internet-Draft, draft-ietf-pppext-ipcp-network-01.txt, includes
the following description:

      If negotiation about the remote IP-address is required, and the
      peer did not provide the option in its Configure-Request, the
      option SHOULD be appended to a Configure-Nak.  The value of the
      IP-address given must be acceptable as the remote IP-address, or
      indicate a request that the peer provide the information.

So, the following patch is suitable for requesting valid IP address
again instead of accepting of invalid address 0.0.0.0, I think.

*** ../ppp.org/ipcp.c	Sun Feb 23 22:21:00 1997
--- ipcp.c	Sat May 10 09:39:20 1997
***************
*** 355,360 ****
--- 355,369 ----
            break;
  
  	}
+ #if 1 /* reply NAK for 0.0.0.0 IP-address request */
+ 	if (ipaddr.s_addr == 0) {
+ 	  /* draft-ietf-pppext-ipcp-network-01.txt */
+ 	  bcopy(cp, nakp, 2);
+ 	  bcopy(&ipaddr, nakp+2, length);
+ 	  nakp += length;
+ 	  break;
+ 	}
+ #endif
  	IpcpInfo.his_ipaddr = ipaddr;
  	bcopy(cp, ackp, length);
  	ackp += length;

Comments?
---
Faculty of Economics, Kyoto University, Kyoto, 606-01 JAPAN
Motonori NAKAMURA    E-mail: <motonori@econ.kyoto-u.ac.jp>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970510100950F.motonori>