changeset 1965:db6a09bc1353

* src/ipcp.c: * src/sys-ecos.c: Move ipcp wantoptions initialization from cyg_ppp_options_install to ipcp_init. This fixes a bug with default route operation introduced in the ACCM enhancement on 2004-12-1.
author asl
date Wed, 27 Apr 2005 06:20:45 +0000
parents c9c702b0f576
children dd83e9152bc8
files packages/net/ppp/current/ChangeLog packages/net/ppp/current/src/ipcp.c packages/net/ppp/current/src/sys-ecos.c
diffstat 3 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/ppp/current/ChangeLog
+++ b/packages/net/ppp/current/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-21	Matt Jerdonek <maj1224@yahoo.com>
+
+	* src/ipcp.c:
+	* src/sys-ecos.c: Move ipcp wantoptions initialization from
+	  cyg_ppp_options_install to ipcp_init.  This fixes a bug
+	  with default route operation introduced in the ACCM 
+	  enhancement on 2004-12-1.
+
 2005-03-27  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* tests/ppp_up.c: Change the prototype of pr_func to match 
--- a/packages/net/ppp/current/src/ipcp.c
+++ b/packages/net/ppp/current/src/ipcp.c
@@ -87,6 +87,7 @@
 #include "cyg/ppp/pppd.h"
 #include "cyg/ppp/fsm.h"
 #include "cyg/ppp/ipcp.h"
+#include "cyg/ppp/ppp_io.h"
 
 #define option_error(msg) db_printf("Option error: %s\n", msg )
 
@@ -229,6 +230,9 @@ ipcp_init(unit)
     wo->vj_protocol = IPCP_VJ_COMP;
     wo->maxslotindex = MAX_STATES - 1; /* really max index */
     wo->cflag = 1;
+    wo->ouraddr     = ppp_tty.options->our_address;
+    wo->hisaddr     = ppp_tty.options->his_address;
+    wo->default_route = ppp_tty.options->default_route;
 
     /* max slots and slot-id compression are currently hardwired in */
     /* ppp_if.c to 16 and 1, this needs to be changed (among other */
--- a/packages/net/ppp/current/src/sys-ecos.c
+++ b/packages/net/ppp/current/src/sys-ecos.c
@@ -1757,16 +1757,6 @@ externC void cyg_ppp_options_install( co
     idle_time_limit     = options->idle_time_limit;
     maxconnect          = options->maxconnect;
 
-    {
-        ipcp_options *wo = &ipcp_wantoptions[0];
-
-        wo->ouraddr     = options->our_address;
-        wo->hisaddr     = options->his_address;
-
-        wo->default_route = options->default_route;
-        
-    }
-
     script              = options->script;
     
     strncpy( user, &options->user[0], MAXNAMELEN );