diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-08-17 14:50:06 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-08-17 14:50:06 +0000 |
commit | 0af52d37b763271344cc4a4a09c047ec132ce1e2 (patch) | |
tree | c4fdd3cb01fee5a4c11b14e28dd6693c53b2ff37 /sbin/dhclient | |
parent | 56f8613aaa9e5a839928963830c58bd41e114e64 (diff) |
Do not create a route to the bound address via 127.0.0.1. Our stack
should be able to correctly short-circuit packet routing to local
addresses without this. Requested by many over the years, most
recently chrisz@.
Get it in early to see if anything does break.
ok claudio@ henning@
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/kroute.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 87e1aa0f3fb..f0da325155b 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.55 2013/07/05 22:13:10 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.56 2013/08/17 14:50:05 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -381,7 +381,6 @@ priv_delete_address(struct imsg_delete_address *imsg) * [priv_]add_address is the equivalent of * * ifconfig <if> inet <addr> netmask <mask> broadcast <addr> - * route -q <rdomain> add <addr> 127.0.0.1 */ void add_address(char *ifname, int rdomain, struct in_addr addr, @@ -410,7 +409,6 @@ add_address(char *ifname, int rdomain, struct in_addr addr, void priv_add_address(struct imsg_add_address *imsg) { - struct imsg_add_route rimsg; struct ifaliasreq ifaliasreq; struct sockaddr_in *in; int s; @@ -453,17 +451,6 @@ priv_add_address(struct imsg_add_address *imsg) close(s); - /* - * Add the 127.0.0.1 route for the specified address. - */ - memset(&rimsg, 0, sizeof(rimsg)); - rimsg.dest.s_addr = imsg->addr.s_addr; - rimsg.gateway.s_addr = inet_addr("127.0.0.1"); - rimsg.addrs = RTA_DST | RTA_GATEWAY; - rimsg.flags = RTF_GATEWAY | RTF_STATIC; - - priv_add_route(&rimsg); - active_addr = imsg->addr; } |