Small fixes for linux routing core
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Mon, 6 May 2013 06:20:11 +0000 (08:20 +0200)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Mon, 6 May 2013 06:20:11 +0000 (08:20 +0200)
src-api/core/os_linux/os_routing_linux.c

index 352f36f..d89e40c 100644 (file)
@@ -156,8 +156,7 @@ _cleanup(void) {
   struct os_route *rt, *rt_it;
 
   list_for_each_element_safe(&_rtnetlink_feedback, rt, _internal._node, rt_it) {
-    rt->cb_finished(rt, true);
-    list_remove(&rt->_internal._node);
+    _routing_finished(rt, 1);
   }
 
   if (_original_icmp_redirect != 0
@@ -478,7 +477,7 @@ _routing_set(struct nlmsghdr *msg, struct os_route *route,
   }
 
   if (netaddr_get_address_family(&route->gw) != AF_UNSPEC) {
-    rt_msg->rtm_flags = RTNH_F_ONLINK;
+    rt_msg->rtm_flags |= RTNH_F_ONLINK;
 
     /* add gateway */
     if (os_system_netlink_addnetaddr(msg, RTA_GATEWAY, &route->gw)) {