buglwIP - A Lightweight TCP/IP stack - Bugs: bug #38748, Allow NETIF_MAX_HWADDR_LEN to be...

 
 

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

bug #38748: Allow NETIF_MAX_HWADDR_LEN to be Overridden by lwipopts.h

Submitter:  Grant Erickson <marathon96>
Submitted:  Tue 16 Apr 2013 05:23:58 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Change Request Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.4.1

Thu 26 Feb 2015 09:31:01 PM UTC, comment #5: 

This is already fixed (overridable).

Simon Goldschmidt <goldsimon>
Group administrator
Wed 24 Apr 2013 09:52:49 PM UTC, comment #4: 

At present, the netif is the canonical structure for getting network interface information, including IP addresses, MTU and link layer address. So, from that perspective, yes.

Grant Erickson <marathon96>
Wed 24 Apr 2013 08:36:42 PM UTC, comment #3: 

I know there are networks with hwaddr-length != 6, but what's your specific problem to solve, and is it really solved just by making that define overridable?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 24 Apr 2013 08:00:42 PM UTC, comment #2: 

For non-802.3 or -802.11 network interfaces in which the hardware address is eight octets rather than six, this is required.

Grant Erickson <marathon96>
Wed 24 Apr 2013 07:11:18 PM UTC, comment #1: 

Could you elaborate on why you need this?

Plus: at least with the current code, you risk buffer overflows as the define is expected to be 6 in some places. I do admit that this is not as it should be, but as it is, just changing the define might hurt more than it solves?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 16 Apr 2013 05:23:58 AM UTC, original submission:  

This patch allows NETIF_MAX_HWADDR_LEN to be overridden by lwipopts.h:


From fa53125534a21cafc730ced78f05fe100f9145c5 Mon Sep 17 00:00:00 2001
From: Grant Erickson <marathon96@gmail.com>
Date: Mon, 15 Apr 2013 22:17:47 -0700
Subject: [PATCH] net if: allow NETIF_MAX_HWADDR_LEN to be overridden

Allow NETIF_MAX_HWADDR_LEN to be overridden by lwipopts.h.

---
 production/sw/tps/lwip/lwip/src/include/lwip/netif.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/production/sw/tps/lwip/lwip/src/include/lwip/netif.h b/production/sw/tps/lwip/lwip/src/include/lwip/netif.h
index 322d2d0..e794125 100644
--- a/production/sw/tps/lwip/lwip/src/include/lwip/netif.h
+++ b/production/sw/tps/lwip/lwip/src/include/lwip/netif.h
@@ -62,7 +62,9 @@ extern "C" {
 
 /** must be the maximum of all used hardware address lengths
     across all types of interfaces in use */
+#ifndef NETIF_MAX_HWADDR_LEN
 #define NETIF_MAX_HWADDR_LEN 6U
+#endif /* NETIF_MAX_HWADDR_LEN */
 
 /** Whether the network interface is 'up'. This is
  * a software flag used to control whether this network
--
1.8.1.1

Grant Erickson <marathon96>

 

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

Attached Files
file #28214:  0001-Make-the-IPv6-Neighbor-Discovery-Protocol-NDP-implem.patch added by marathon96 (8KiB - application/octet-stream - Additional, follow-on patch to the initial patch.)
file #27888:  lwip-0001.1.patch added by marathon96 (1014B - application/octet-stream - Proposed patch to address this issue.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by marathon96 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-26 goldsimon StatusNeed Info Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2013-05-31 marathon96 Attached File- Added 0001-Make-the-IPv6-Neighbor-Discovery-Protocol-NDP-implem.patch, #28214
    2013-04-24 goldsimon StatusNone Need Info
    2013-04-16 marathon96 Attached File- Added lwip-0001.1.patch, #27888

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code