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)
Feb 21 2024, 6:34 PM
Unknown Object (File)
Feb 11 2024, 9:09 AM
Unknown Object (File)
Jan 23 2024, 11:38 AM
Unknown Object (File)
Dec 20 2023, 12:50 AM
Unknown Object (File)
Dec 19 2023, 1:36 PM
Unknown Object (File)
Dec 17 2023, 12:23 PM
Unknown Object (File)
Dec 12 2023, 3:31 AM
Unknown Object (File)
Dec 2 2023, 7:25 AM
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