mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-30 12:50:58 +00:00
Merge pull request #2531 from cesanta/mqttrndis
Add MQTT device through RNDIS example
This commit is contained in:
17 files changed
+471
-22
No files matched your search
+4
-1
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user