summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-13 22:20:52 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-05-14 21:38:20 +0200
commitd81d6b8ad3b984b19a427934830a2b2b5c4e3c8f (patch)
tree15fce21bbdc93643df19daf2751c32d771cccab7
parent2dc0f134aa7ec68ea7892a0d5e18d2e70b59a40e (diff)
system-linux: set the point to point address if present
-rw-r--r--system-linux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/system-linux.c b/system-linux.c
index 91b162d..af252ea 100644
--- 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);
- 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);
}