Merge pull request #2531 from cesanta/mqttrndis

Add MQTT device through RNDIS example
This commit is contained in:
Sergio R. Caprile authored and GitHub committed 2023-12-15 13:39:21 -03:00
commit cd021daf79
17 files changed
+471 -22

No files matched your search

+4 -1
View File
@@ -4920,7 +4920,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));
}