[PATCH] netlink: fix flags use in nm_netlink_route_add



Flags are not getting set when a route is added (e.g. NLM_F_REPLACE).
Apparently this was fixed in Ubuntu, but I didn't see a patch here, so
here it is.

---
 src/nm-netlink-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nm-netlink-utils.c b/src/nm-netlink-utils.c
index cc61197..743f946 100644
--- a/src/nm-netlink-utils.c
+++ b/src/nm-netlink-utils.c
@@ -230,7 +230,7 @@ int nm_netlink_route_add(struct rtnl_route * route,
 		}
 	}
 
-	err = rtnl_route_add (sk, route, 0);
+	err = rtnl_route_add (sk, route, flags);
 
 	/* LIBNL Bug: Aliased ESRCH */
 	if (err == -NLE_FAILURE)
-- 
1.7.5.4





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]