This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: default_route set to 0 during cyg_ppp_up


Per,

The attached moves the wo initialization (which
includes the default route) from
cyg_ppp_options_install to ipcp_init.  I verified that
the patch works for me.  Do you want to try it before
it gets committed?

Thanks,
-- Matt


--- Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Apr 20, 2005 at 10:19:18AM -0700, Matt
> Jerdonek wrote:
> > First let me apologize because it appears as if
> the
> > patch we submitted is the source of the problem.
> > 
> > The patch was submitted to allow ACCM to be
> > negotiated.  The suspect line of code was moved to
> > allow the ACCM values to be setup before the LCP
> was
> > initialized.
> > 
> > Instead of moving the line of code back to its
> > original spot (which would break the patch), can
> we
> > instead remove the wo initialization within
> > cyg_ppp_options_install into ipcp_init.c?
> > 
> > Maintainers -- do you want me to submit a patch on
> > this?
> 
> Yes please.
> 
>         Andrew
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Index: ppp/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/ppp/current/ChangeLog,v
retrieving revision 1.10
diff -u -r1.10 ChangeLog
--- ppp/current/ChangeLog	7 Apr 2005 16:06:58 -0000	1.10
+++ ppp/current/ChangeLog	22 Apr 2005 15:42:41 -0000
@@ -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 
Index: ppp/current/src/ipcp.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/ppp/current/src/ipcp.c,v
retrieving revision 1.3
diff -u -r1.3 ipcp.c
--- ppp/current/src/ipcp.c	23 Jul 2004 11:00:41 -0000	1.3
+++ ppp/current/src/ipcp.c	22 Apr 2005 15:42:41 -0000
@@ -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 @@
     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 */
Index: ppp/current/src/sys-ecos.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/ppp/current/src/sys-ecos.c,v
retrieving revision 1.6
diff -u -r1.6 sys-ecos.c
--- ppp/current/src/sys-ecos.c	7 Apr 2005 16:07:00 -0000	1.6
+++ ppp/current/src/sys-ecos.c	22 Apr 2005 15:42:42 -0000
@@ -1757,16 +1757,6 @@
     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 );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]