diff --git a/babeld/kernel_zebra.c b/babeld/kernel_zebra.c
index 97b7c58..f23403e 100644
--- a/babeld/kernel_zebra.c
+++ b/babeld/kernel_zebra.c
@@ -59,26 +59,20 @@
 
 static int
 kernel_route_add_v4(const unsigned char *pref, unsigned short plen,
-                    const unsigned char *gate, int ifindex, unsigned int metric,
-                    const unsigned char *newgate, int newifindex,
-                    unsigned int newmetric);
+                    const unsigned char *gate, int ifindex,
+                    unsigned int metric);
 static int
 kernel_route_add_v6(const unsigned char *pref, unsigned short plen,
-                    const unsigned char *gate, int ifindex, unsigned int metric,
-                    const unsigned char *newgate, int newifindex,
-                    unsigned int newmetric);
+                    const unsigned char *gate, int ifindex,
+                    unsigned int metric);
 static int
 kernel_route_delete_v4(const unsigned char *pref, unsigned short plen,
                        const unsigned char *gate, int ifindex,
-                       unsigned int metric,
-                       const unsigned char *newgate, int newifindex,
-                       unsigned int newmetric);
+                       unsigned int metric);
 static int
 kernel_route_delete_v6(const unsigned char *pref, unsigned short plen,
                        const unsigned char *gate, int ifindex,
-                       unsigned int metric,
-                       const unsigned char *newgate, int newifindex,
-                       unsigned int newmetric);
+                       unsigned int metric);
 
 int
 kernel_interface_operational(struct interface *interface)
@@ -125,47 +119,29 @@
     switch (operation) {
         case ROUTE_ADD:
             return ipv4 ?
-                   kernel_route_add_v4(pref, plen, gate, ifindex, metric,
-                                       newgate, newifindex, newmetric):
-                   kernel_route_add_v6(pref, plen, gate, ifindex, metric,
-                                       newgate, newifindex, newmetric);
+                   kernel_route_add_v4(pref, plen, gate, ifindex, metric):
+                   kernel_route_add_v6(pref, plen, gate, ifindex, metric);
             break;
         case ROUTE_FLUSH:
             return ipv4 ?
-                   kernel_route_delete_v4(pref, plen, gate, ifindex, metric,
-                                          newgate, newifindex, newmetric):
-                   kernel_route_delete_v6(pref, plen, gate, ifindex, metric,
-                                          newgate, newifindex, newmetric);
+                   kernel_route_delete_v4(pref, plen, gate, ifindex, metric):
+                   kernel_route_delete_v6(pref, plen, gate, ifindex, metric);
             break;
         case ROUTE_MODIFY:
             if(newmetric == metric && memcmp(newgate, gate, 16) == 0 &&
                newifindex == ifindex)
                 return 0;
             debugf(BABEL_DEBUG_ROUTE, "Modify route: delete old; add new.");
-            if (ipv4) {
-                kernel_route_delete_v4(pref, plen,
-                                       gate, ifindex, metric,
-                                       NULL, 0, 0);
-            } else {
-                kernel_route_delete_v6(pref, plen,
-                                       gate, ifindex, metric,
-                                       NULL, 0, 0);
-            }
+            rc = ipv4 ?
+                kernel_route_delete_v4(pref, plen, gate, ifindex, metric):
+                kernel_route_delete_v6(pref, plen, gate, ifindex, metric);
+
+            if (rc < 0)
+                return -1;
 
             rc = ipv4 ?
-            kernel_route_add_v4(pref, plen,
-                                newgate, newifindex, newmetric,
-                                NULL, 0, 0):
-            kernel_route_add_v6(pref, plen,
-                                newgate, newifindex, newmetric,
-                                NULL, 0, 0);
-            if(rc < 0) {
-                if(errno == EEXIST)
-                    rc = 1;
-                /* In principle, we should try to re-install the flushed
-                 route on failure to preserve.  However, this should
-                 hopefully not matter much in practice. */
-            }
+                kernel_route_add_v4(pref, plen, newgate, newifindex, newmetric):
+                kernel_route_add_v6(pref, plen, newgate, newifindex, newmetric);
 
             return rc;
             break;
@@ -179,9 +155,7 @@
 
 static int
 kernel_route_add_v4(const unsigned char *pref, unsigned short plen,
-                    const unsigned char *gate, int ifindex, unsigned int metric,
-                    const unsigned char *newgate, int newifindex,
-                    unsigned int newmetric)
+                    const unsigned char *gate, int ifindex, unsigned int metric)
 {
     unsigned int tmp_ifindex = ifindex; /* (for typing) */
     struct zapi_ipv4 api;               /* quagga's communication system */
@@ -190,7 +164,7 @@
     struct in_addr nexthop;             /* next router to go */
     struct in_addr *nexthop_pointer = &nexthop; /* it's an array! */
 
-    /* convert to be comprehensive by quagga */
+    /* convert to be understandable by quagga */
     /* convert given addresses */
     uchar_to_inaddr(&babel_prefix_addr, pref);
     uchar_to_inaddr(&nexthop, gate);
@@ -222,9 +196,7 @@
 
 static int
 kernel_route_add_v6(const unsigned char *pref, unsigned short plen,
-                    const unsigned char *gate, int ifindex, unsigned int metric,
-                    const unsigned char *newgate, int newifindex,
-                    unsigned int newmetric)
+                    const unsigned char *gate, int ifindex, unsigned int metric)
 {
     unsigned int tmp_ifindex = ifindex; /* (for typing) */
     struct zapi_ipv6 api;               /* quagga's communication system */
@@ -233,7 +205,7 @@
     struct in6_addr nexthop;            /* next router to go */
     struct in6_addr *nexthop_pointer = &nexthop;
 
-    /* convert to be comprehensive by quagga */
+    /* convert to be understandable by quagga */
     /* convert given addresses */
     uchar_to_in6addr(&babel_prefix_addr, pref);
     uchar_to_in6addr(&nexthop, gate);
@@ -266,9 +238,7 @@
 static int
 kernel_route_delete_v4(const unsigned char *pref, unsigned short plen,
                        const unsigned char *gate, int ifindex,
-                       unsigned int metric,
-                       const unsigned char *newgate, int newifindex,
-                       unsigned int newmetric)
+                       unsigned int metric)
 {
     unsigned int tmp_ifindex = ifindex; /* (for typing) */
     struct zapi_ipv4 api;               /* quagga's communication system */
@@ -277,7 +247,7 @@
     struct in_addr nexthop;             /* next router to go */
     struct in_addr *nexthop_pointer = &nexthop; /* it's an array! */
 
-    /* convert to be comprehensive by quagga */
+    /* convert to be understandable by quagga */
     /* convert given addresses */
     uchar_to_inaddr(&babel_prefix_addr, pref);
     uchar_to_inaddr(&nexthop, gate);
@@ -310,9 +280,7 @@
 static int
 kernel_route_delete_v6(const unsigned char *pref, unsigned short plen,
                        const unsigned char *gate, int ifindex,
-                       unsigned int metric,
-                       const unsigned char *newgate, int newifindex,
-                       unsigned int newmetric)
+                       unsigned int metric)
 {
     unsigned int tmp_ifindex = ifindex; /* (for typing) */
     struct zapi_ipv6 api;               /* quagga's communication system */
@@ -321,7 +289,7 @@
     struct in6_addr nexthop;            /* next router to go */
     struct in6_addr *nexthop_pointer = &nexthop;
 
-    /* convert to be comprehensive by quagga */
+    /* convert to be understandable by quagga */
     /* convert given addresses */
     uchar_to_in6addr(&babel_prefix_addr, pref);
     uchar_to_in6addr(&nexthop, gate);
