mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
Network: All logic will now handle varialbe length link layer protocol headers within incoming packets. This permits use of multiple network interfaces with differing data links. For example, ETHERNET + SLIP
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define IGMPBUF ((struct igmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
|
||||
#define IGMPBUF ((struct igmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
@@ -125,7 +125,7 @@ void igmp_input(struct net_driver_s *dev)
|
||||
|
||||
/* Verify the message length */
|
||||
|
||||
if (dev->d_len < NET_LL_HDRLEN+IPIGMP_HDRLEN)
|
||||
if (dev->d_len < NET_LL_HDRLEN(dev) + IPIGMP_HDRLEN)
|
||||
{
|
||||
IGMP_STATINCR(g_netstats.igmp.length_errors);
|
||||
nlldbg("Length error\n");
|
||||
|
||||
Reference in New Issue
Block a user