mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@kalray.eu>
Subject: [PATCH] fixup! net: dns: Generate and verify transaction ID
Date: Fri,  6 May 2022 16:58:56 +0200	[thread overview]
Message-ID: <20220506145856.14831-1-jmaselbas@kalray.eu> (raw)
In-Reply-To: <20220505100805.5144-1-jmaselbas@kalray.eu>

Signed-off-by: Jules Maselbas <jmaselbas@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-05-06 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 10:08 [PATCH] " Jules Maselbas
2022-05-06 14:58 ` Jules Maselbas [this message]
2022-05-06 14:59   ` [PATCH] fixup! " Jules Maselbas
2022-05-06 15:16   ` Jules Maselbas
2022-05-06 15:04 ` [PATCH] " Jules Maselbas
2022-05-09  7:17   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220506145856.14831-1-jmaselbas@kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH] fixup'\!' net: dns: Generate and verify transaction ID' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox