]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/kernel_netlink.c
zebra: delay default vrf name after vrf initialization
[mirror_frr.git] / zebra / kernel_netlink.c
index 08219924fbc4bfcdaab65b594c3adb8c4234aba2..0772c59b9228b63f01afffb03b27fef7ad65a415 100644 (file)
@@ -314,11 +314,17 @@ bool netlink_read;
  */
 void netlink_read_init(const char *fname)
 {
+       struct zebra_dplane_info dp_info;
+
        snprintf(netlink_fuzz_file, MAXPATHLEN, "%s", fname);
        /* Creating this fake socket for testing purposes */
        struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
 
-       netlink_parse_info(netlink_information_fetch, &zns->netlink, zns, 1, 0);
+       /* Capture key info from zns struct */
+       zebra_dplane_info_from_zns(&dp_info, zns, false);
+
+       netlink_parse_info(netlink_information_fetch, &zns->netlink,
+                          &dp_info, 1, 0);
 }
 
 /**
@@ -928,7 +934,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
  *
  * filter   -> The filter to read final results from kernel
  * nlmsghdr -> The data to send to the kernel
- * zns_info -> The netlink socket information
+ * dp_info -> The dataplane and netlink socket information
  * startup  -> Are we reading in under startup conditions
  *             This is passed through eventually to filter.
  */
@@ -984,7 +990,6 @@ int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
                return -1;
        }
 
-
        /*
         * Get reply from netlink socket.
         * The reply should either be an acknowlegement or an error.
@@ -995,7 +1000,6 @@ int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
 /*
  * Synchronous version of netlink_talk_info. Converts args to suit the
  * common version, which is suitable for both sync and async use.
- *
  */
 int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
                 struct nlmsghdr *n, struct nlsock *nl, struct zebra_ns *zns,