connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Lars Steubesand <lars@bbl.ms.philips.com>
To: connman@lists.linux.dev
Subject: [PATCH 0/3] Fix DHCP renew handling
Date: Tue, 22 Feb 2022 10:11:26 +0100	[thread overview]
Message-ID: <20220222091129.29525-1-lars@bbl.ms.philips.com> (raw)

From: Lars Steubesand <lars.steubesand@philips.com>

It appears that commit
58d397ba7487 ("gdhcp: Avoid reading invalid data in dhcp_get_option")
broke DHCP renew handling. Fix this and add more robust handling
of DHCP options with length checks.

The patch
[PATCH 3/3] gdhcp: Add unit tests for dhcp_get_option
some minimal form of unit testing for parsing DHCP options.
If not required or not desired this way the patch can be
dropped.

Lars Steubesand (2):
  gdhcp: Further check invalid data in dhcp_get_option
  gdhcp: Add unit tests for dhcp_get_option

Lauser, Simon (1):
  gdhcp: Set packet length when receiving L3 packet

 .gitignore               |   1 +
 Makefile.am              |   9 +
 gdhcp/client.c           |  11 +-
 gdhcp/common.c           |  73 +++++++-
 gdhcp/common.h           |   2 +-
 gdhcp/server.c           |   6 +-
 unit/test-dhcp-options.c | 365 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 449 insertions(+), 18 deletions(-)
 create mode 100644 unit/test-dhcp-options.c


base-commit: b335791af9194d1bd7b9821f4c5abc5405109557
-- 
2.17.1


             reply	other threads:[~2022-02-22  9:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  9:11 Lars Steubesand [this message]
2022-02-22  9:11 ` [PATCH 1/3] gdhcp: Set packet length when receiving L3 packet Lars Steubesand
2022-02-22  9:11 ` [PATCH 2/3] gdhcp: Further check invalid data in dhcp_get_option Lars Steubesand
2022-02-22  9:11 ` [PATCH 3/3] gdhcp: Add unit tests for dhcp_get_option Lars Steubesand

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=20220222091129.29525-1-lars@bbl.ms.philips.com \
    --to=lars@bbl.ms.philips.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 NNTP newsgroup(s).