diff options
| author | Roy Marples <roy@marples.name> | 2008-09-13 10:48:48 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-09-13 10:48:48 +0000 |
| commit | a43bdfa634a490856dc4e2deb4b66e008d3f9b9d (patch) | |
| tree | 02df1d307dd5f1547b13c5c943e93c575f13887b /if-linux.c | |
| parent | 441f7d159dbb8448f075e177f9c3770503fc6aa4 (diff) | |
| download | dhcpcd-a43bdfa634a490856dc4e2deb4b66e008d3f9b9d.tar.xz | |
Fix subnet route.
Diffstat (limited to 'if-linux.c')
| -rw-r--r-- | if-linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -365,7 +365,8 @@ if_route(const struct interface *iface, else { nlm->hdr.nlmsg_flags |= NLM_F_CREATE | NLM_F_EXCL; /* We only change route metrics for kernel routes */ - if (action == 0 && netmask->s_addr == iface->net.s_addr) + if (destination->s_addr == (iface->addr.s_addr & iface->net.s_addr) && + netmask->s_addr == iface->net.s_addr) nlm->rt.rtm_protocol = RTPROT_KERNEL; else nlm->rt.rtm_protocol = RTPROT_BOOT; |
