@@ -587,6 +587,7 @@ static void fpm_read(struct event *t)
587
587
struct zebra_dplane_ctx * ctx ;
588
588
size_t available_bytes ;
589
589
size_t hdr_available_bytes ;
590
+ int ival ;
590
591
591
592
/* Let's ignore the input at the moment. */
592
593
rv = stream_read_try (fnc -> ibuf , fnc -> socket ,
@@ -715,17 +716,28 @@ static void fpm_read(struct event *t)
715
716
break ;
716
717
}
717
718
719
+ /* Parse the route data into a dplane ctx, then
720
+ * enqueue it to zebra for processing.
721
+ */
718
722
ctx = dplane_ctx_alloc ();
719
723
dplane_ctx_route_init (ctx , DPLANE_OP_ROUTE_NOTIFY , NULL ,
720
724
NULL );
721
- if (netlink_route_change_read_unicast_internal (
722
- hdr , 0 , false, ctx ) != 1 ) {
723
- dplane_ctx_fini (& ctx );
724
- stream_pulldown (fnc -> ibuf );
725
+
726
+ if (netlink_route_notify_read_ctx (hdr , 0 , ctx ) >= 0 ) {
727
+ /* In the FPM encoding, the vrfid is present */
728
+ ival = dplane_ctx_get_table (ctx );
729
+ dplane_ctx_set_vrf (ctx , ival );
730
+ dplane_ctx_set_table (ctx ,
731
+ ZEBRA_ROUTE_TABLE_UNKNOWN );
732
+
733
+ dplane_provider_enqueue_to_zebra (ctx );
734
+ } else {
725
735
/*
726
736
* Let's continue to read other messages
727
737
* Even if we ignore this one.
728
738
*/
739
+ dplane_ctx_fini (& ctx );
740
+ stream_pulldown (fnc -> ibuf );
729
741
}
730
742
break ;
731
743
default :
0 commit comments