summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/libnetlink/iputils.c8
-rw-r--r--accel-pppd/libnetlink/iputils.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c
index 0100c52b..59483003 100644
--- a/accel-pppd/libnetlink/iputils.c
+++ b/accel-pppd/libnetlink/iputils.c
@@ -68,6 +68,14 @@ static void free_rth(void *arg)
_free(rth);
}
+struct rtnl_handle __export *iputils_get_handle()
+{
+ if (!rth)
+ open_rth();
+
+ return rth;
+}
+
static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
{
struct ifinfomsg *ifi = NLMSG_DATA(n);
diff --git a/accel-pppd/libnetlink/iputils.h b/accel-pppd/libnetlink/iputils.h
index a623197f..cd3eb17f 100644
--- a/accel-pppd/libnetlink/iputils.h
+++ b/accel-pppd/libnetlink/iputils.h
@@ -27,4 +27,6 @@ int ip6addr_del(int ifindex, struct in6_addr *addr, int prefix_len);
int iprule_add(uint32_t addr, int table);
int iprule_del(uint32_t addr, int table);
+
+struct rtnl_handle *iputils_get_handle();
#endif