Log a warning whenever RTM_DESYNC is seen. Thus giving entrail
authorkrw <krw@openbsd.org>
Sat, 12 Jul 2014 21:04:07 +0000 (21:04 +0000)
committerkrw <krw@openbsd.org>
Sat, 12 Jul 2014 21:04:07 +0000 (21:04 +0000)
investigators some clue why dhclient may have gotten confused when
some RTM_ messages vanish.

sthen@ thinks this is a good start.

sbin/dhclient/dhclient.c

index bf7e92d..b5264ce 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhclient.c,v 1.316 2014/07/12 09:04:21 krw Exp $      */
+/*     $OpenBSD: dhclient.c,v 1.317 2014/07/12 21:04:07 krw Exp $      */
 
 /*
  * Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -228,6 +228,9 @@ routehandler(void)
                goto done;
 
        switch (rtm->rtm_type) {
+       case RTM_DESYNC:
+               warning("route socket buffer overflow");
+               break;
        case RTM_NEWADDR:
                ifam = (struct ifa_msghdr *)rtm;
                if (ifam->ifam_index != ifi->index)