]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
poib: assign link-local address according to RFC
authorkib <kib@FreeBSD.org>
Tue, 23 Apr 2019 12:23:44 +0000 (12:23 +0000)
committerkib <kib@FreeBSD.org>
Tue, 23 Apr 2019 12:23:44 +0000 (12:23 +0000)
commita7264374f6b20a1a5086b9ac97d78bf74785e7a5
tree083592633c304dd969511dd1ef6daf39766070f5
parent87874d0b3ea03611b14ce498ba2f0925d149408a
poib: assign link-local address according to RFC

RFC 4391 specifies that the IB interface GID should be re-used as IPv6
link-local address.  Since the code in in6_get_hw_ifid() ignored
IFT_INFINIBAND case, ibX interfaces ended up with the local address
borrowed from some other interface, which is non-compliant.

Use lowest eight bytes from GID for filling the link-local address,
same as Linux.

Reviewed by: bz (previous version), ae, hselasky, slavash,
Sponsored by: Mellanox Technologies
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D20006
sys/netinet6/in6_ifattach.c