diff options
| author | ZYH <[email protected]> | 2017-12-21 21:26:54 +0800 |
|---|---|---|
| committer | ZYH <[email protected]> | 2017-12-21 21:26:54 +0800 |
| commit | fe27b9751cbb00397d93cb6bb4b355546c4f4d64 (patch) | |
| tree | e801c2e85f95c8459ace48e5f51e3c03f1d16e2e /components/net | |
| parent | 92f5b437f77a444f01ef78e258f1fe6c96b656a6 (diff) | |
| parent | d78f5eb6740310649db8e7f4ba81afeca826a5d5 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'components/net')
| -rw-r--r-- | components/net/Kconfig | 7 | ||||
| -rw-r--r-- | components/net/lwip-2.0.2/src/netif/ethernetif.c | 24 |
2 files changed, 24 insertions, 7 deletions
diff --git a/components/net/Kconfig b/components/net/Kconfig index af375e6c03..f75ed461b1 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -27,7 +27,7 @@ config RT_USING_LWIP config RT_LWIP_IGMP bool "IGMP protocol" - default n + default y config RT_LWIP_ICMP bool "ICMP protocol" @@ -91,12 +91,12 @@ config RT_USING_LWIP config RT_LWIP_PPPOE bool "PPPoE protocol" default n - + config RT_LWIP_PPPOS bool "PPPoS protocol" default n endif - + config RT_MEMP_NUM_NETCONN int "the number of struct netconns" default 8 @@ -111,6 +111,7 @@ config RT_USING_LWIP config RT_LWIP_UDP_PCB_NUM int "the number of UDP socket" + default 8 if RT_USING_DFS_NFS default 4 if RT_LWIP_TCP diff --git a/components/net/lwip-2.0.2/src/netif/ethernetif.c b/components/net/lwip-2.0.2/src/netif/ethernetif.c index bd28815c4b..ba23528c58 100644 --- a/components/net/lwip-2.0.2/src/netif/ethernetif.c +++ b/components/net/lwip-2.0.2/src/netif/ethernetif.c @@ -173,10 +173,26 @@ static err_t eth_netif_device_init(struct netif *netif) netif->flags = (ethif->flags & 0xff); #if LWIP_IPV6 - netif->output_ip6 = ethip6_output; - netif->ip6_autoconfig_enabled = 1; - netif_create_ip6_linklocal_address(netif, 1); - netif->flags |= NETIF_FLAG_MLD6; + netif->output_ip6 = ethip6_output; + netif->ip6_autoconfig_enabled = 1; + netif_create_ip6_linklocal_address(netif, 1); + +#if LWIP_IPV6_MLD + netif->flags |= NETIF_FLAG_MLD6; + + /* + * For hardware/netifs that implement MAC filtering. + * All-nodes link-local is handled by default, so we must let the hardware know + * to allow multicast packets in. + * Should set mld_mac_filter previously. */ + if (netif->mld_mac_filter != NULL) + { + ip6_addr_t ip6_allnodes_ll; + ip6_addr_set_allnodes_linklocal(&ip6_allnodes_ll); + netif->mld_mac_filter(netif, &ip6_allnodes_ll, NETIF_ADD_MAC_FILTER); + } +#endif /* LWIP_IPV6_MLD */ + #endif /* LWIP_IPV6 */ /* set default netif */ |
