mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91b87a6bd8 |
No files matched your search
+2
-3
@@ -2146,13 +2146,12 @@ bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *dm) {
|
||||
dm->txnid = mg_ntohs(h->txnid);
|
||||
is_response = mg_ntohs(h->flags) & 0x8000;
|
||||
|
||||
for (i = 0; i < mg_ntohs(h->num_questions); i++) { // advance past queries
|
||||
for (i = 0; i < mg_ntohs(h->num_questions); i++) {
|
||||
if ((n = mg_dns_parse_rr(buf, len, ofs, true, &rr)) == 0) return false;
|
||||
// MG_INFO(("Q %lu %lu %hu/%hu", ofs, n, rr.atype, rr.aclass));
|
||||
dm->addr.is_ip6 = (rr.atype == MG_DNS_RTYPE_AAAA);
|
||||
mg_dns_parse_name(buf, len, ofs, dm->name, sizeof(dm->name));
|
||||
ofs += n;
|
||||
} // on unresolved responses, we got the name and query type, at least
|
||||
}
|
||||
|
||||
if (!is_response) {
|
||||
// For queries, there is no need to parse the answers. In this way,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef MONGOOSE_H
|
||||
#define MONGOOSE_H
|
||||
|
||||
#define MG_VERSION "7.23"
|
||||
#define MG_VERSION "7.24"
|
||||
|
||||
// IMPORTANT:
|
||||
// Before implementing any functionality, pull this file and use it as a guide:
|
||||
|
||||
+5
-5
@@ -3,22 +3,22 @@
|
||||
"bomFormat": "CycloneDX",
|
||||
"specVersion": "1.6",
|
||||
"serialNumber": "urn:uuid:d3f8b1e2-4a7c-4d9e-bf2a-1c3e5f7a9b0d",
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"metadata": {
|
||||
"timestamp": "2026-10-13T00:00:00Z",
|
||||
"timestamp": "2026-11-18T00:00:00Z",
|
||||
"component": {
|
||||
"type": "library",
|
||||
"bom-ref": "mongoose",
|
||||
"supplier": { "name": "Cesanta Software Limited", "url": ["https://cesanta.com"] },
|
||||
"author": "Cesanta Software Limited",
|
||||
"name": "mongoose",
|
||||
"version": "7.23",
|
||||
"version": "7.24",
|
||||
"description": "Two-file C/C++ embedded networking library. HTTP, WebSocket, MQTT, TLS 1.3, OTA firmware updates, device dashboard. Runs on microcontrollers and desktop OS.",
|
||||
"licenses": [
|
||||
{ "expression": "GPL-2.0-only" },
|
||||
{ "license": { "name": "Cesanta Commercial License", "url": "https://mongoose.ws/licensing/" } }
|
||||
],
|
||||
"purl": "pkg:github/cesanta/mongoose@7.23",
|
||||
"purl": "pkg:github/cesanta/mongoose@7.24",
|
||||
"externalReferences": [
|
||||
{ "type": "website", "url": "https://mongoose.ws" },
|
||||
{ "type": "vcs", "url": "https://github.com/cesanta/mongoose" },
|
||||
@@ -27,7 +27,7 @@
|
||||
{ "type": "distribution", "url": "https://raw.githubusercontent.com/cesanta/mongoose/master/mongoose.c" }
|
||||
],
|
||||
"properties": [
|
||||
{ "name": "cpe", "value": "cpe:2.3:a:cesanta:mongoose:7.23:*:*:*:*:*:*:*" }
|
||||
{ "name": "cpe", "value": "cpe:2.3:a:cesanta:mongoose:7.24:*:*:*:*:*:*:*" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -136,13 +136,12 @@ bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *dm) {
|
||||
dm->txnid = mg_ntohs(h->txnid);
|
||||
is_response = mg_ntohs(h->flags) & 0x8000;
|
||||
|
||||
for (i = 0; i < mg_ntohs(h->num_questions); i++) { // advance past queries
|
||||
for (i = 0; i < mg_ntohs(h->num_questions); i++) {
|
||||
if ((n = mg_dns_parse_rr(buf, len, ofs, true, &rr)) == 0) return false;
|
||||
// MG_INFO(("Q %lu %lu %hu/%hu", ofs, n, rr.atype, rr.aclass));
|
||||
dm->addr.is_ip6 = (rr.atype == MG_DNS_RTYPE_AAAA);
|
||||
mg_dns_parse_name(buf, len, ofs, dm->name, sizeof(dm->name));
|
||||
ofs += n;
|
||||
} // on unresolved responses, we got the name and query type, at least
|
||||
}
|
||||
|
||||
if (!is_response) {
|
||||
// For queries, there is no need to parse the answers. In this way,
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
#define MG_VERSION "7.23"
|
||||
#define MG_VERSION "7.24"
|
||||
Reference in new issue
Block a user