Skip to content

Commit

Permalink
ip6: fix iface output for multicast destination
Browse files Browse the repository at this point in the history
The returned nexthop for a multicast route lookup doesn't have
a defined iface.
Yet, this nexthop is valid, and we can rely on the iface defined
by the parent node to select the output iface.

Signed-off-by: Christophe Fontaine <[email protected]>
  • Loading branch information
christophefontaine committed Jan 15, 2025
1 parent 39dd3a3 commit 78f1bb6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ip6/datapath/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ ip6_output_process(struct rte_graph *graph, struct rte_node *node, void **objs,
edge = DEST_UNREACH;
goto next;
}
iface = iface_from_id(nh->iface_id);

// For multicast destination, nh->iface will be NULL
if (rte_ipv6_addr_is_mcast(&ip->dst_addr))
iface = mbuf_data(mbuf)->iface;
else
iface = iface_from_id(nh->iface_id);
if (iface == NULL) {
edge = ERROR;
goto next;
Expand Down

0 comments on commit 78f1bb6

Please sign in to comment.