--- ppp-2.3.7/pppd/ipcp.c Fri Mar 19 05:22:51 1999 +++ ppp-2.3.7.new/pppd/ipcp.c Wed Apr 28 20:24:32 1999 @@ -218,6 +218,13 @@ static pid_t ipcp_script_pid; /* + * Added to allow static and dynamic ip(s) + * Hold the static address from pap-secrets + */ +u_int32_t staticaddr; +/******************************************/ + +/* * Make a string representation of a network IP address. */ char * @@ -1055,6 +1062,15 @@ orc = CONFNAK; if (!reject_if_disagree) { DECPTR(sizeof(u_int32_t), p); + + /* + * Added to allow static and dynamic ip(s) + * Are they asking for their static ip from pap-secrets? + */ + if(ciaddr1 !=0 && ciaddr1 == staticaddr) + wo->hisaddr = staticaddr; /* Let them use the static ip */ + /*******************************************/ + tl = ntohl(wo->hisaddr); PUTLONG(tl, p); } @@ -1078,6 +1094,15 @@ orc = CONFNAK; if (!reject_if_disagree) { DECPTR(sizeof(u_int32_t), p); + + /* + * Added to allow static and dynamic ip(s) + * Are they asking for their static ip from pap-secrets? + */ + if(ciaddr1 !=0 && ciaddr1 == staticaddr) + wo->hisaddr = staticaddr; /* Let them use the static ip */ + /*******************************************/ + tl = ntohl(wo->ouraddr); PUTLONG(tl, p); } --- ppp-2.3.7/pppd/ipcp.h Tue Mar 2 06:34:34 1999 +++ ppp-2.3.7.new/pppd/ipcp.h Wed Apr 28 20:27:15 1999 @@ -70,4 +70,10 @@ char *ip_ntoa __P((u_int32_t)); +/* Added to allow static and dynamic ip(s). + * Holds the static ip from pap-secrets + */ +u_int32_t staticaddr; +/******************************************/ + extern struct protent ipcp_protent;