diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index 0830097..b9466d3 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -797,6 +797,9 @@ nl_parse_route(struct nlmsghdr *h, int scan)
     .cast = RTC_UNICAST
   };
 
+  if (i->rtm_protocol == RTPROT_BOOT)
+    src = KRT_SRC_KERNEL;
+
   switch (i->rtm_type)
     {
     case RTN_UNICAST:
@@ -856,9 +859,6 @@ nl_parse_route(struct nlmsghdr *h, int scan)
 	   * behavior in IPv4. Anyway, users should use RTPROT_STATIC
 	   * for their 'alien' routes.
 	   */
-
-	  if (i->rtm_protocol == RTPROT_BOOT)
-	    src = KRT_SRC_KERNEL;
 	}
 
       break;
