buglwIP - A Lightweight TCP/IP stack - Bugs: bug #36436, ethernet input flag not set on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #36436: ethernet input flag not set on unix proj minimal mintapif

Submitted by:  Sylvain Rochet <gradator>
Submitted on:  Tue 08 May 2012 03:12:45 PM UTC  
 
Category: ContribSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.4.0

(Jump to the original submission Jump to the original submission)

Thu 20 Feb 2014 09:07:46 PM UTC, comment #6:

Good to know! Thank you.
The bug reports as closed in 1.4.0 and this problem is definitely present in 1.4.1.
At least it won't be present in 1.4.2
Regards.

Sergio R. Caprile <scaprile>
Thu 20 Feb 2014 08:46:03 PM UTC, comment #5:

As far as I see it, this is included in git head, it's done in low_level_init().

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 20 Feb 2014 02:04:17 AM UTC, comment #4:

Hi, I came across to this bug report after actually having fixed it myself... so sorry but not, it is not closed.

The example in contrib/ports/unix/proj/minimal/ initializes its interface in file mintapif.c.
Code in function mintapif_init(struct netif *netif)
on that file does not set any flags on the netif structure. As NETIF_FLAG_ETHARP is not set, ARP packets are later discarded at the input function and so the users are not able to see the example running.

My fix: I just added the flags as they are set on the provided tapif initialization in the main contrib branch in contrib/ports/unix/netif/tapif.c (please find attached)

There is also an older patch (2010) commented on this thread in lwip-users:
http://lists.nongnu.org/archive/html/lwip-users/2010-10/msg00120.html

(file #30610)

Sergio R. Caprile <scaprile>
Mon 14 May 2012 03:51:36 PM UTC, comment #3:

Just for clarity, and for other users seeking solutions to their own problems, can you describe the symptom of the bug that this patch solves?

Kieran Mansley <kieranm>
Project Administrator
Fri 11 May 2012 08:50:57 PM UTC, comment #2:

Oh!, I just copied how flags are set from the AVR32UC3 Atmel port, which probably in turn needs to be fixed as well.

Thanks for the head up! :)

Sylvain Rochet <gradator>
Project Member
Fri 11 May 2012 08:44:16 PM UTC, comment #1:

Thanks for the patch. Note that there's an error in your patch: NETIF_FLAG_DHCP may not be set by the netif init function. Instead, it is set and cleared by the dhcp code. I don't think that it does any harm, but it's not correct, anyway.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 08 May 2012 03:12:45 PM UTC, original submission:

ports/unix/proj/minimal/mintapif.c don't set necessary flags in netif->flags, here is a patch that fix that.

Sylvain Rochet <gradator>
Project Member

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by scaprile (Updated the item)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by gradator (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Feb 2014 02:04:17 AM UTCscaprileAttached File-=>Added contrib_ports_unix_minimal_mintapif.patch, #30610
    Fri 11 May 2012 08:44:16 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Tue 08 May 2012 03:12:45 PM UTCgradatorAttached File-=>Added ports-unix-proj-minimal-mintapif-ether-input.patch, #25819

    Back to the top


    Powered by Savane 3.1-cleanup1