From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27843 invoked by alias); 23 Sep 2009 13:04:50 -0000 Received: (qmail 27829 invoked by uid 22791); 23 Sep 2009 13:04:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f202.google.com (HELO mail-px0-f202.google.com) (209.85.216.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Sep 2009 13:04:42 +0000 Received: by pxi40 with SMTP id 40so565598pxi.24 for ; Wed, 23 Sep 2009 06:04:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.24.40 with SMTP id b40mr167360wfj.0.1253711081016; Wed, 23 Sep 2009 06:04:41 -0700 (PDT) In-Reply-To: <4ABA192E.3020109@intefo.ch> References: <4AB87C82.3090901@intefo.ch> <4ABA192E.3020109@intefo.ch> Date: Wed, 23 Sep 2009 13:04:00 -0000 Message-ID: From: Mandeep Sandhu To: Simon Kallweit Cc: ecos-discuss Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] ecos with lwip and 2 interfaces X-SW-Source: 2009-09/txt/msg00214.txt.bz2 On Wed, Sep 23, 2009 at 6:18 PM, Simon Kallweit wrote: > Mandeep Sandhu wrote: >> >> You're right Simon. Enabling the second interface there made things >> work (to some extent). >> >> However, I'm facing a new problem now. >> >> Previously I was using only a single interface (the Linux tap0 >> device). I have implemented a DHCP server which was working fine until >> I enabled the SECOND INTERFACE. >> >> Now, my socket writes on the first interface (the tap0 interface) have >> started failing! That is, without changing _any_ code! :( The return >> value of sendto is coming as '-1' and the error string is set to 'No >> error'. Actually this problem starts even if I don't enable support >> for eth1 in the lwIP config. Just enabling the second interface under >> "Common ethernet support -> Synthetic target ethernet driver" causes >> this problem to surface. >> >> Any clues as to what could be going wrong? > > Well, this could be a problem because the default netif was set incorrectly. > Only one netif can be the default netif. Currently the last initialized > ethernet device would be set as default (incorrectly). I have changed that > in the new version, also added 'Default netif' for loopif and slipif devices > and also expanded configurability of ethernet netifs to 4 devices > (previously 2). Now, only the selected netif should be the default netif. > Please test with the new version and see if that helps: Exactly my conclusion too! In eth_drv_init() we are setting the netif as default without checking conf->def! I observed another thing while debugging this issue. Even though my Default interface is set to eth0, the option CYGDAT_LWIP_ETH0_DEFAULT in the .ecc file is still not set! I'm using "configtool" to change my config. Is this a GUI tool issue? I'll test out the new release and let you know. Thanks as always. Regards, -mandeep > > http://download.westlicht.ch/lwip-20090923.tar.gz > > Simon > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss