From 7d2b5c958309013e889299f66bc62be7e33583b2 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 23 Mar 2012 10:00:02 +0000 Subject: [PATCH] Fix crash in DHCPINFORM without valid --dhcp-range. --- CHANGELOG | 4 ++++ src/rfc2131.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6c1c07b..5431b49 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -51,6 +51,10 @@ version 2.61 the lo interface. Thanks to Mathieu Trudel-Lapierre for the idea and initial patch. + Fix crash, introduced in 2.60, when a DHCPINFORM is + received from a network which has no valid dhcp-range. + Thanks to Stephane Glondu for the bug report. + version 2.60 Fix compilation problem in Mac OS X Lion. Thanks to Olaf diff --git a/src/rfc2131.c b/src/rfc2131.c index 83dc4c1..d5581bc 100644 --- a/src/rfc2131.c +++ b/src/rfc2131.c @@ -2095,7 +2095,8 @@ static void do_options(struct dhcp_context *context, struct dhcp_netid_list *id_list; /* filter options based on tags, those we want get DHOPT_TAGOK bit set */ - context->netid.next = NULL; + if (context) + context->netid.next = NULL; tagif = option_filter(netid, context && context->netid.net ? &context->netid : NULL, config_opts); /* logging */