Re: [PATCH v2] IPv6: sr: Fix End.X nexthop to use oif.

From: Jakub Kicinski
Date: Mon Oct 19 2020 - 12:17:09 EST


On Mon, 19 Oct 2020 09:25:12 +0530 Reji Thomas wrote:
> > > @@ -566,7 +583,8 @@ static struct seg6_action_desc seg6_action_table[] = {
> > > },
> > > {
> > > .action = SEG6_LOCAL_ACTION_END_X,
> > > - .attrs = (1 << SEG6_LOCAL_NH6),
> > > + .attrs = ((1 << SEG6_LOCAL_NH6) |
> > > + (1 << SEG6_LOCAL_OIF)),
> > > .input = input_action_end_x,
> > > },
> > > {
> >
> > If you set this parse_nla_action() will reject all
> > SEG6_LOCAL_ACTION_END_X without OIF.
> >
> > As you say the OIF is only required for using link local addresses,
> > so this change breaks perfectly legitimate configurations.
> >
> > Can we instead only warn about the missing OIF, and only do that when
> > nh is link local?
> >
> End.X is defined as an adjacency-sid and is used to select a specific link to a
> neighbor for both global and link-local addresses. The intention was
> to drop the
> packet even for global addresses if the route via the specific
> interface is not found.
> Alternatively(believe semantically correct for End.X definition) I
> could do a neighbor lookup
> for nexthop address over specific interface and send the packet out.

If we can save the device lookup and still be semantically correct,
that's probably better.