diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-11-29 16:36:45 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-11-29 16:36:45 +0300 |
commit | b136f6215b47d5cfd92aa3b2c458b2f36993b7ee (patch) | |
tree | 12eb93c9ba361c914df4b8493bbeac8261688684 /accel-pppd | |
parent | 63fbf6ed3ccb0eba42aaf0e6b15217b3c18ac5cc (diff) | |
download | accel-ppp-b136f6215b47d5cfd92aa3b2c458b2f36993b7ee.tar.gz accel-ppp-b136f6215b47d5cfd92aa3b2c458b2f36993b7ee.zip |
fixed compilation
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/libnetlink/iputils.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index 7c70209b..0100c52b 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -357,8 +357,9 @@ int __export ipaddr_add_peer(int ifindex, in_addr_t addr, int mask, in_addr_t pe struct ifaddrmsg i; char buf[4096]; } req; - struct rtnl_handle *rth = net->rtnl_get(); - int r = 0; + + if (!rth) + open_rth(); if (!rth) return -1; @@ -376,11 +377,9 @@ int __export ipaddr_add_peer(int ifindex, in_addr_t addr, int mask, in_addr_t pe addattr32(&req.n, sizeof(req), IFA_ADDRESS, peer_addr); if (rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL, 0) < 0) - r = -1; - - net->rtnl_put(rth); + return -1; - return r; + return 0; } int __export ipaddr_del(int ifindex, in_addr_t addr, int mask) |