diff mbox series

set pkt_len when packet is received using L3 listening mode so that the ACK can be processed correctly

Message ID 20240322132455.833-1-john.mark@kistler.com (mailing list archive)
State Accepted
Commit 49b16df36de0604c55d596119b2350c5c327a517
Headers show
Series set pkt_len when packet is received using L3 listening mode so that the ACK can be processed correctly | expand

Commit Message

John Mark March 22, 2024, 1:24 p.m. UTC
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(+)

Comments

patchwork-bot+connman@kernel.org April 3, 2024, 6:20 p.m. UTC | #1
Hello:

This patch was applied to connman.git (master)
by Denis Kenzior <denkenz@gmail.com>:

On Fri, 22 Mar 2024 09:24:55 -0400 you wrote:
> 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(+)

Here is the summary with links:
  - set pkt_len when packet is received using L3 listening mode so that the ACK can be processed correctly
    https://git.kernel.org/pub/scm/network/connman/connman.git/?id=49b16df36de0

You are awesome, thank you!
Marcel Holtmann Sept. 2, 2024, 8:31 a.m. UTC | #2
Hi John,

> 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) {

is this still needed? The patch does no longer apply.

Regards

Marcel
diff mbox series

Patch

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) {