We can't learn anything interesting from RTM_NEWADDR, stop handling
authorflorian <florian@openbsd.org>
Tue, 16 Mar 2021 17:39:15 +0000 (17:39 +0000)
committerflorian <florian@openbsd.org>
Tue, 16 Mar 2021 17:39:15 +0000 (17:39 +0000)
it.

sbin/dhcpleased/dhcpleased.c
sbin/dhcpleased/frontend.c

index a71fcbe..e27a340 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhcpleased.c,v 1.7 2021/03/07 18:39:11 florian Exp $  */
+/*     $OpenBSD: dhcpleased.c,v 1.8 2021/03/16 17:39:15 florian Exp $  */
 
 /*
  * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -250,8 +250,7 @@ main(int argc, char *argv[])
            AF_INET)) == -1)
                fatal("route socket");
 
-       rtfilter = ROUTE_FILTER(RTM_IFINFO) | ROUTE_FILTER(RTM_NEWADDR) |
-           ROUTE_FILTER(RTM_PROPOSAL);
+       rtfilter = ROUTE_FILTER(RTM_IFINFO) | ROUTE_FILTER(RTM_PROPOSAL);
        if (setsockopt(frontend_routesock, AF_ROUTE, ROUTE_MSGFILTER,
            &rtfilter, sizeof(rtfilter)) == -1)
                fatal("setsockopt(ROUTE_MSGFILTER)");
index 6cd1ced..fbbeb63 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.4 2021/03/14 16:05:50 florian Exp $    */
+/*     $OpenBSD: frontend.c,v 1.5 2021/03/16 17:39:15 florian Exp $    */
 
 /*
  * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -633,13 +633,6 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info)
                        }
                }
                break;
-       case RTM_NEWADDR:
-               ifm = (struct if_msghdr *)rtm;
-               if_name = if_indextoname(ifm->ifm_index, ifnamebuf);
-               log_debug("RTM_NEWADDR: %s[%u]", if_name == NULL ?
-                   "?" : if_name, ifm->ifm_index);
-               update_iface(ifm->ifm_index, if_name);
-               break;
        case RTM_PROPOSAL:
                if (rtm->rtm_priority == RTP_PROPOSAL_SOLICIT) {
                        log_debug("RTP_PROPOSAL_SOLICIT");