]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ensure that we add the src pref address.
authorRoy Marples <roy@marples.name>
Thu, 27 Nov 2008 16:16:32 +0000 (16:16 +0000)
committerRoy Marples <roy@marples.name>
Thu, 27 Nov 2008 16:16:32 +0000 (16:16 +0000)
if-linux.c

index 5125ff2272792a092f29659f497efcb38356645d..c9cba9ef133918d7076fce17d43f8f155094340f 100644 (file)
@@ -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));
        }