From: Roy Marples Date: Tue, 13 Nov 2007 10:22:45 +0000 (+0000) Subject: Link local routes should not be static. X-Git-Tag: v3.2.3~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=912ed56a320879b2a670a5ad3e268038fa447425;p=thirdparty%2Fdhcpcd.git Link local routes should not be static. --- diff --git a/interface.c b/interface.c index 6177380f..9fbe007a 100644 --- a/interface.c +++ b/interface.c @@ -560,7 +560,10 @@ static int do_route (const char *ifname, rtm.hdr.rtm_version = RTM_VERSION; rtm.hdr.rtm_seq = ++seq; rtm.hdr.rtm_type = change ? RTM_CHANGE : del ? RTM_DELETE : RTM_ADD; - rtm.hdr.rtm_flags = RTF_UP | RTF_STATIC; + rtm.hdr.rtm_flags = RTF_UP; + if (ntohl (destination.s_addr) != LINKLOCAL_ADDR && + ntohl (netmask.s_addr) != LINKLOCAL_MASK) + rtm.hdr.rtm_flags |= RTF_STATIC; /* This order is important */ rtm.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;