From: krw Date: Mon, 12 May 2014 18:50:02 +0000 (+0000) Subject: Don't exit on encountering RTM_NEWADDR or RTM_DELADDR routing messages X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cdfdaaa3e0eb9f80bc7497d32d017f45850af2a5;p=openbsd Don't exit on encountering RTM_NEWADDR or RTM_DELADDR routing messages that lack the appropriate address info. Simply ignore the message as is done for short or incorrectly versioned messages ok claudio@ --- diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 2289d96e00a..50356a086c8 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.305 2014/05/11 14:00:52 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.306 2014/05/12 18:50:02 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -237,10 +237,8 @@ routehandler(void) break; sa = get_ifa((char *)ifam + ifam->ifam_hdrlen, ifam->ifam_addrs); - if (sa == NULL) { - rslt = asprintf(&errmsg, "%s sa == NULL", ifi->name); - goto die; - } + if (sa == NULL) + goto done; memcpy(&a, &((struct sockaddr_in *)sa)->sin_addr, sizeof(a)); if (a.s_addr == INADDR_ANY) @@ -280,10 +278,8 @@ routehandler(void) break; sa = get_ifa((char *)ifam + ifam->ifam_hdrlen, ifam->ifam_addrs); - if (sa == NULL) { - rslt = asprintf(&errmsg, "%s sa == NULL", ifi->name); - goto die; - } + if (sa == NULL) + goto done; memcpy(&a, &((struct sockaddr_in *)sa)->sin_addr, sizeof(a)); if (a.s_addr == INADDR_ANY)