fix(demo/cdc_ecm_template): device tcp/ip stack mac can't same as host

This commit is contained in:
sakumisu
2024-06-27 22:36:33 +08:00
parent 6e7502ec07
commit 35807fb9d9

View File

@@ -215,6 +215,7 @@ void cdc_ecm_lwip_init(void)
netif->hwaddr_len = 6;
memcpy(netif->hwaddr, mac, 6);
netif->hwaddr[5] = ~netif->hwaddr[5]; /* device mac can't same as host. */
netif = netif_add(netif, &ipaddr, &netmask, &gateway, NULL, cdc_ecm_if_init, netif_input);
netif_set_default(netif);