]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix link routes which broke in 3.1.2.
authorRoy Marples <roy@marples.name>
Tue, 31 Jul 2007 14:09:00 +0000 (14:09 +0000)
committerRoy Marples <roy@marples.name>
Tue, 31 Jul 2007 14:09:00 +0000 (14:09 +0000)
ChangeLog
Makefile
interface.c

index 29c592793ace8f4cfb761d215e8eb7be5683bd1d..e9f196eb26b68036bd54004823e579cc67148ba7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+dhcpcd-3.1.3
+Fix link routes which broke in 3.1.2.
+
 dhcpcd-3.1.2
 Use a generic route logger.
 Fix static route netmask calculation and applicaton.
index ef0fb73d2b406fb071f039b5cb04177af5cc108d..8f64812cd4e0a877947528ebcb4b10ce00f219b4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = 3.1.2
+VERSION = 3.1.3
 CFLAGS ?= -O2 -pipe
 
 # Should work for both GNU make and BSD make
index 3420b5de404a52531c19e4eef4c266a64e4d4d7a..4b74fefb8e066da73f923f6f0b43a0fd269780a2 100644 (file)
@@ -898,7 +898,8 @@ static int do_route (const char *ifname,
        else {
                nlm.hdr.nlmsg_flags |= NLM_F_CREATE | NLM_F_EXCL;
                nlm.rt.rtm_protocol = RTPROT_BOOT;
-               if (netmask.s_addr == INADDR_BROADCAST)
+               if (netmask.s_addr == INADDR_BROADCAST ||
+                       gateway.s_addr == INADDR_ANY)
                        nlm.rt.rtm_scope = RT_SCOPE_LINK;
                else
                        nlm.rt.rtm_scope = RT_SCOPE_UNIVERSE;