Don't exit on encountering RTM_NEWADDR or RTM_DELADDR routing messages
authorkrw <krw@openbsd.org>
Mon, 12 May 2014 18:50:02 +0000 (18:50 +0000)
committerkrw <krw@openbsd.org>
Mon, 12 May 2014 18:50:02 +0000 (18:50 +0000)
that lack the appropriate address info.

Simply ignore the message as is done for short or incorrectly
versioned messages

ok claudio@

sbin/dhclient/dhclient.c

index 2289d96..50356a0 100644 (file)
@@ -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 <henning@openbsd.org>
@@ -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)