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

Submitter:  Sylvain Rochet <gradator>
Submitted:  Tue 08 May 2012 03:12:45 PM UTC
   
 
Category:  Contrib Severity:  3 - Normal
Item Group:  Crash Error Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.4.0

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>
Group administrator
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>
Group Member
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>
Group 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>
Group administrator
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #30610:  contrib_ports_unix_minimal_mintapif.patch added by scaprile (343B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-20 scaprile Attached File- Added contrib_ports_unix_minimal_mintapif.patch, #30610
    2012-05-11 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2012-05-08 gradator Attached File- Added ports-unix-proj-minimal-mintapif-ether-input.patch, #25819

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code