ConnMan network manager
 help / color / mirror / Atom feed
From: John Mark <john.mark@kistler.com>
To: <connman@lists.linux.dev>
Cc: John Mark <john.mark@kistler.com>
Subject: [PATCH] set pkt_len when packet is received using L3 listening mode so that the ACK can be processed correctly
Date: Fri, 22 Mar 2024 09:24:55 -0400	[thread overview]
Message-ID: <20240322132455.833-1-john.mark@kistler.com> (raw)

The packet length is not set correctly when an IPv4 L3 ACK is received from a
DHCP server.  This causes the packet to be rejected for having no
MESSAGE_TYPE option and the lease is not renewed at the T1 point (or any
subsequent retry).  Instead, the lease gets re-bound at the T2 point.

---
 gdhcp/client.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdhcp/client.c b/gdhcp/client.c
index 82017692..c58c7be9 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -2316,6 +2316,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
 		} else {
 			re = dhcp_recv_l3_packet(&packet,
 						dhcp_client->listener_sockfd);
+			pkt_len = (uint16_t)(unsigned int)re;
 			xid = packet.xid;
 		}
 	} else if (dhcp_client->listen_mode == L_ARP) {
-- 
2.34.1


Confidentiality Notice: This e-mail is privileged and confidential and for the use of the addressee only. Should you have received this e-mail in error please notify us by replying directly to the sender or by sending a message to info@kistler.com. Unauthorised dissemination, disclosure or copying of the contents of this e-mail, or any similar action, is prohibited. 

             reply	other threads:[~2024-03-22 13:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 13:24 John Mark [this message]
2024-04-03 18:20 ` [PATCH] set pkt_len when packet is received using L3 listening mode so that the ACK can be processed correctly patchwork-bot+connman

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=20240322132455.833-1-john.mark@kistler.com \
    --to=john.mark@kistler.com \
    --cc=connman@lists.linux.dev \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).