Add MQTT device through RNDIS example

This commit is contained in:
Sergio R. Caprile committed 2023-12-13 17:24:52 -03:00
1 parent ad90b0b7b1
commit ad57731ae1
17 files changed
+471 -22

No files matched your search

+4 -1
View File
@@ -450,7 +450,10 @@ static void rx_dhcp_server(struct mg_tcpip_if *ifp, struct pkt *pkt) {
memcpy(&res.options, opts, sizeof(opts));
res.magic = pkt->dhcp->magic;
res.xid = pkt->dhcp->xid;
// memcpy(ifp->gwmac, pkt->eth->src, sizeof(ifp->gwmac));
if (ifp->enable_get_gateway) {
ifp->gw = res.yiaddr;
memcpy(ifp->gwmac, pkt->eth->src, sizeof(ifp->gwmac));
}
tx_udp(ifp, pkt->eth->src, ifp->ip, mg_htons(67),
op == 1 ? ~0U : res.yiaddr, mg_htons(68), &res, sizeof(res));
}