diff options
author | Antonio Quartulli <a@unstable.cc> | 2021-09-03 19:58:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-05 15:14:37 +0300 |
commit | e5dd729460ca8d2da02028dbf264b65be8cd4b5f (patch) | |
tree | 2cd8d4ef4eec07aa5438db09c51cea946729c86a /net/ipv6/ip6_vti.c | |
parent | 81d0885d68ec427e62044cf46a400c9958ea0092 (diff) | |
download | linux-e5dd729460ca8d2da02028dbf264b65be8cd4b5f.tar.xz |
ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address
GRE interfaces are not Ether-like and therefore it is not
possible to generate the v6LL address the same way as (for example)
GRETAP devices.
With default settings, a GRE interface will attempt generating its v6LL
address using the EUI64 approach, but this will fail when the local
endpoint of the GRE tunnel is set to "any". In this case the GRE
interface will end up with no v6LL address, thus violating RFC4291.
SIT interfaces already implement a different logic to ensure that a v6LL
address is always computed.
Change the GRE v6LL generation logic to follow the same approach as SIT.
This way GRE interfaces will always have a v6LL address as well.
Behaviour of GRETAP interfaces has not been changed as they behave like
classic Ether-like interfaces.
To avoid code duplication sit_add_v4_addrs() has been renamed to
add_v4_addrs() and adapted to handle also the IP6GRE/GRE cases.
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_vti.c')
0 files changed, 0 insertions, 0 deletions