[PATCH] fixup! net: dns: Generate and verify transaction ID
Jules Maselbas
jmaselbas at kalray.eu
Fri May 6 07:58:56 PDT 2022
Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
---
net/dns.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dns.c b/net/dns.c
index 9ad316e33..9803ef475 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -58,7 +58,7 @@ struct header {
static struct net_connection *dns_con;
static uint64_t dns_timer_start;
-static uin32_t dns_req_id;
+static uint32_t dns_req_id;
static int dns_state;
static IPaddr_t dns_ip;
@@ -132,7 +132,7 @@ static void dns_recv(struct header *header, unsigned len)
pr_debug("%s\n", __func__);
/* Only accept responses with the expected request id */
- if (ntohs(header->id) != dns_req_id)
+ if (ntohs(header->tid) != dns_req_id)
return;
/* We sent 1 query. We want to see more that 1 answer. */
--
2.17.1
More information about the barebox
mailing list