diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index c40b8ec2..1d757a9b 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -870,6 +870,7 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to)
     }
     else
     {
+      rta *ra = s->route->attrs;
       ip_addr nh[2] = { s->channel->next_hop_addr, s->channel->link_addr };
       bgp_set_attr_data(to, s->pool, BA_NEXT_HOP, 0, nh, ipa_nonzero(nh[1]) ? 32 : 16);
 
@@ -877,7 +878,9 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to)
       if (s->mpls)
       {
 	u32 implicit_null = BGP_MPLS_NULL;
-	bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, &implicit_null, 4);
+	u32 *labels = ra->nh.labels ? ra->nh.label : &implicit_null;
+	uint lnum = ra->nh.labels ? ra->nh.labels : 1;
+	bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, labels, lnum * 4);
       }
     }
   }
