summaryrefslogtreecommitdiff
path: root/accel-pppd/libnetlink/iputils.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/libnetlink/iputils.c')
-rw-r--r--accel-pppd/libnetlink/iputils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c
index 0ae4b04c..17f40f3a 100644
--- a/accel-pppd/libnetlink/iputils.c
+++ b/accel-pppd/libnetlink/iputils.c
@@ -250,7 +250,8 @@ int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst)
req.i.rtm_type = RTN_UNICAST;
req.i.rtm_dst_len = 32;
- addattr32(&req.n, sizeof(req), RTA_PREFSRC, src);
+ if (src)
+ addattr32(&req.n, sizeof(req), RTA_PREFSRC, src);
addattr32(&req.n, sizeof(req), RTA_DST, dst);
addattr32(&req.n, sizeof(req), RTA_OIF, ifindex);