Page MenuHomeFreeBSD

fib6_rte_to_nh_*: correctly return a link-local gw address:
ClosedPublic

Authored by bz on Feb 28 2020, 10:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 7:14 AM
Unknown Object (File)
Mon, Sep 23, 5:25 AM
Unknown Object (File)
Sun, Sep 22, 5:52 AM
Unknown Object (File)
Sat, Sep 21, 5:21 AM
Unknown Object (File)
Fri, Sep 20, 8:06 AM
Unknown Object (File)
Fri, Sep 20, 8:05 AM
Unknown Object (File)
Fri, Sep 20, 6:56 AM
Unknown Object (File)
Mon, Sep 16, 10:43 PM
Subscribers

Details

Summary

In fib6_rte_to_nh_* when returning a link-local gateway address
currently we do clear the scope. That could be recovered using
the ifp returned as well, but the code in general seems to
expect a link-local address with scope embeedded as otherwise
the "dst" (gw) passed to the output routines will not include
scope and not send the packet out (the right interface).

Do not clear the scope when returning a link-local address and
allow packets to go out (the right interface).

Sponsored by: Netflix

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This code, probably, was written with hope of depreciation of scope embedding into addresses.
If you plan to remove these, please leave the comment that returned address has embedded scope.
Also you will probably want to remove related XXX hack from fast forwarding code.

Update based on @ae 's comments.

In D23872#524865, @ae wrote:

This code, probably, was written with hope of depreciation of scope embedding into addresses.

I think that'd be a good separate project but should be done entirely on its own most likely not intermixing it with other changes.

If you plan to remove these, please leave the comment that returned address has embedded scope.
Also you will probably want to remove related XXX hack from fast forwarding code.

Done. Looks OK to you now?

Looks good to me. But I'd wait for @melifaro, there are several places where this KPI is used and I didn't check how it can affect it :)

My primary concern here is the overall direction on the embedded scope in the kernel. This looks like bit of a step back, however, if you're share the view that eventually we need to eliminate this scope embedding, I'm totally fine with that.

This revision is now accepted and ready to land.Mar 1 2020, 11:06 PM