Skip to content

Commit

Permalink
Adds fix for loop back suppression during duplicate address detection…
Browse files Browse the repository at this point in the history
… process
  • Loading branch information
rosahay-silabs committed Oct 12, 2022
1 parent 0e47710 commit 3b49bcb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lwip/efr32/lwipopts-rs911x.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#define LWIP_IPV6_FRAG (LWIP_IPV6)
#define LWIP_IPV6_DHCP6 0
#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6)
#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 // TODO: Enable this after a fix for NS loopback
#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1
#define LWIP_IPV6_ROUTER_SUPPORT (LWIP_IPV6)
#define LWIP_ND6_LISTEN_RA (LWIP_IPV6_ND)
#define LWIP_ND6_NUM_NEIGHBORS (2)
Expand Down
2 changes: 1 addition & 1 deletion src/lwip/efr32/lwipopts-wf200.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#define LWIP_IPV6_FRAG (LWIP_IPV6)
#define LWIP_IPV6_DHCP6 0
#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6)
#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 0 // TODO: Enable this after a fix for NS loopback
#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1
#define LWIP_IPV6_ROUTER_SUPPORT (LWIP_IPV6)
#define LWIP_ND6_LISTEN_RA (LWIP_IPV6_ND)
#define LWIP_ND6_NUM_NEIGHBORS (2)
Expand Down
10 changes: 10 additions & 0 deletions src/platform/EFR32/wifi/ethernetif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ static void low_level_input(struct netif * netif, uint8_t * b, uint16_t len)
{ /* 60 : LWIP frame alignment */
len = LWIP_FRAME_ALIGNMENT;
}

/* Drop packets originated from the same interface and is a multicast destination */
if ((netif->hwaddr[0] == b[6] && netif->hwaddr[1] == b[7] && netif->hwaddr[2] == b[8] && netif->hwaddr[3] == b[9] &&
netif->hwaddr[4] == b[10] && netif->hwaddr[5] == b[11]) &&
!(netif->hwaddr[0] == b[0] && netif->hwaddr[1] == b[1] && netif->hwaddr[2] == b[2] && netif->hwaddr[3] == b[3] &&
netif->hwaddr[4] == b[4] && netif->hwaddr[5] == b[5]))
{
return;
}

/* We allocate a pbuf chain of pbufs from the Lwip buffer pool
* and copy the data to the pbuf chain
*/
Expand Down

0 comments on commit 3b49bcb

Please sign in to comment.