Summary: | [vimage] IPv6 link-local collisions on epair[n]b devices | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Shawn Webb <shawn.webb> | ||||||
Component: | kern | Assignee: | Hiroki Sato <hrs> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | emaste, fullermd, hrs, lidl, pizzamig, rodrigc | ||||||
Priority: | Normal | ||||||||
Version: | Unspecified | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
URL: | https://reviews.freebsd.org/D15329 | ||||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176671 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229957 |
||||||||
Attachments: |
|
Description
Shawn Webb
2013-11-21 17:40:01 UTC
This just bit me, when I found a jail mysteriously disappearing off net when another one appeared that happened to collide :( Before randomizing organization part of the MAC address I would like to know what addresses were actually assigned. Are epairs created in the host environment only or created/moved across multiple jails? A command line example in the original report looks that it happens even if all of epairs and a bridge are created in the host environment or the same vnet jail. Is it a correct understanding? If it is true, I do not understand which addresses actually conflict with each other and why it happened. It is possible that two identical MAC addresses are assigned to two epairNb in different vnet jails because MAC address uses ifindex and it is jail-local. I am working on a patch to fix it. Created attachment 193114 [details] Another possible fix This patch fix the issue, reusing the epair a if_index also for epair b. Moreover, I've added hostid bits in the MAC to avoid that multiple servers that shares the same configuration (failover), will have the same epair MAC address (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176671) A commit references this bug: Author: pizzamig Date: Wed May 23 13:10:58 UTC 2018 New revision: 334094 URL: https://svnweb.freebsd.org/changeset/base/334094 Log: Improve MAC address uniqueness on if_epair(4). As reported in PR184149, it can happen that epair devices can have the same MAC address. This solution is based on a 32-bit hash, obtained combining the if_index of the a interface and the hostid. If the hostid is zero, a random number is used. PR: 184149 Reviewed by: wollman, eugen Approved by: cognet Differential Revision: https://reviews.freebsd.org/D15329 Changes: head/sys/net/if_epair.c *** Bug 176671 has been marked as a duplicate of this bug. *** |