projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not replace proto_ip dns servers on config reload
[project/netifd.git]
/
system-linux.c
diff --git
a/system-linux.c
b/system-linux.c
index
91b162d
..
c7b8b8f
100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-857,8
+857,12
@@
static int system_addr(struct device *dev, struct device_addr *addr, int cmd)
nlmsg_append(msg, &ifa, sizeof(ifa), 0);
nla_put(msg, IFA_LOCAL, alen, &addr->addr);
nlmsg_append(msg, &ifa, sizeof(ifa), 0);
nla_put(msg, IFA_LOCAL, alen, &addr->addr);
- if (v4)
- nla_put_u32(msg, IFA_BROADCAST, addr->broadcast);
+ if (v4) {
+ if (addr->broadcast)
+ nla_put_u32(msg, IFA_BROADCAST, addr->broadcast);
+ if (addr->point_to_point)
+ nla_put_u32(msg, IFA_ADDRESS, addr->point_to_point);
+ }
return system_rtnl_call(msg);
}
return system_rtnl_call(msg);
}
@@
-895,7
+899,7
@@
static int system_rt(struct device *dev, struct device_route *route, int cmd)
.rtm_family = (alen == 4) ? AF_INET : AF_INET6,
.rtm_dst_len = route->mask,
.rtm_table = RT_TABLE_MAIN,
.rtm_family = (alen == 4) ? AF_INET : AF_INET6,
.rtm_dst_len = route->mask,
.rtm_table = RT_TABLE_MAIN,
- .rtm_protocol = RTPROT_BOOT,
+ .rtm_protocol =
(route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL :
RTPROT_BOOT,
.rtm_scope = scope,
.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
};
.rtm_scope = scope,
.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
};