diff options
Diffstat (limited to 'accel-pppd/libnetlink/iputils.c')
-rw-r--r-- | accel-pppd/libnetlink/iputils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index 7d20f672..ad6005f1 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -457,7 +457,7 @@ int __export ipaddr_del_peer(int ifindex, in_addr_t addr, in_addr_t peer) return r; } -int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst, in_addr_t gw, int proto, int mask) +int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst, in_addr_t gw, int proto, int mask, uint32_t prio) { struct ipaddr_req { struct nlmsghdr n; @@ -488,6 +488,8 @@ int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst, in_addr_t gw addattr32(&req.n, sizeof(req), RTA_PREFSRC, src); if (gw) addattr32(&req.n, sizeof(req), RTA_GATEWAY, gw); + if (prio) + addattr32(&req.n, sizeof(req), RTA_PRIORITY, prio); addattr32(&req.n, sizeof(req), RTA_DST, dst); if (rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL, 0) < 0) @@ -498,7 +500,7 @@ int __export iproute_add(int ifindex, in_addr_t src, in_addr_t dst, in_addr_t gw return r; } -int __export iproute_del(int ifindex, in_addr_t dst, int proto, int mask) +int __export iproute_del(int ifindex, in_addr_t dst, int proto, int mask, uint32_t prio) { struct ipaddr_req { struct nlmsghdr n; @@ -527,6 +529,8 @@ int __export iproute_del(int ifindex, in_addr_t dst, int proto, int mask) if (ifindex) addattr32(&req.n, sizeof(req), RTA_OIF, ifindex); + if (prio) + addattr32(&req.n, sizeof(req), RTA_PRIORITY, prio); if (rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL, 0) < 0) r = -1; |