From: Roy Marples Date: Thu, 27 Nov 2008 16:16:32 +0000 (+0000) Subject: Ensure that we add the src pref address. X-Git-Tag: v5.0.0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b96011558a4c5a2a2749e11075d70de9a914bf56;p=thirdparty%2Fdhcpcd.git Ensure that we add the src pref address. --- diff --git a/if-linux.c b/if-linux.c index 5125ff22..c9cba9ef 100644 --- a/if-linux.c +++ b/if-linux.c @@ -406,7 +406,7 @@ if_route(const struct interface *iface, nlm->rt.rtm_dst_len = inet_ntocidr(*netmask); add_attr_l(&nlm->hdr, sizeof(*nlm), RTA_DST, &destination->s_addr, sizeof(destination->s_addr)); - if (action != 1) { + if (nlm->rt.rtm_protocol == RTPROT_KERNEL) { add_attr_l(&nlm->hdr, sizeof(*nlm), RTA_PREFSRC, &iface->addr.s_addr, sizeof(iface->addr.s_addr)); }