diff --git a/src/nm-system.c b/src/nm-system.c index f64f13ba61..3995fab5bb 100644 --- a/src/nm-system.c +++ b/src/nm-system.c @@ -1026,7 +1026,6 @@ gboolean nm_system_replace_default_ip4_route (int ifindex, guint32 gw, guint32 mss) { struct rtnl_route *gw_route = NULL; - struct nl_handle *nlh; gboolean success = FALSE; const char *iface; int err; @@ -1034,9 +1033,6 @@ nm_system_replace_default_ip4_route (int ifindex, guint32 gw, guint32 mss) iface = nm_netlink_index_to_iface (ifindex); g_return_val_if_fail (iface != NULL, FALSE); - nlh = nm_netlink_get_default_handle (); - g_return_val_if_fail (nlh != NULL, FALSE); - err = replace_default_ip4_route (ifindex, gw, mss); if (err == 0) { return TRUE; @@ -1177,7 +1173,6 @@ gboolean nm_system_replace_default_ip6_route (int ifindex, const struct in6_addr *gw) { struct rtnl_route *gw_route = NULL; - struct nl_handle *nlh; gboolean success = FALSE; const char *iface; int err; @@ -1185,9 +1180,6 @@ nm_system_replace_default_ip6_route (int ifindex, const struct in6_addr *gw) iface = nm_netlink_index_to_iface (ifindex); g_return_val_if_fail (iface != NULL, FALSE); - nlh = nm_netlink_get_default_handle (); - g_return_val_if_fail (nlh != NULL, FALSE); - err = replace_default_ip6_route (ifindex, gw); if (err == 0) return TRUE;