From: krw Date: Wed, 28 Jun 2017 12:53:46 +0000 (+0000) Subject: Consistently use socket(..., AF_INET) for routing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1a955ec6a999a7ef7363607dac9991518690b117;p=openbsd Consistently use socket(..., AF_INET) for routing sockets to cut down on unwanted IPv6 messages. suggested by & ok claudio@ --- diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 4803574ecb9..6acc6c5f266 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.449 2017/06/27 13:24:49 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.450 2017/06/28 12:53:46 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -612,7 +612,7 @@ main(int argc, char *argv[]) if (ifi->linkstat == 0) interface_link_forceup(ifi->name); - if ((routefd = socket(PF_ROUTE, SOCK_RAW, 0)) == -1) + if ((routefd = socket(PF_ROUTE, SOCK_RAW, AF_INET)) == -1) fatal("socket(PF_ROUTE, SOCK_RAW)"); rtfilter = ROUTE_FILTER(RTM_PROPOSAL) | ROUTE_FILTER(RTM_NEWADDR) |