mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check if addr is short IPv6
When the addr is sent as a short IPv6 address, e.g., `2804:3be0::`, if might be conflated with the `28:04:3B:E0:00:00` MAC address, which makes the runner look into other data sets than it should.
This commit is contained in:
parent
765504c137
commit
4b2f791bd2
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,7 @@ from __future__ import unicode_literals
|
|||
|
||||
# Import salt lib
|
||||
import salt.output
|
||||
import salt.utils.network
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import map
|
||||
|
||||
|
@ -844,6 +845,8 @@ def find(addr, best=True, display=_DEFAULT_DISPLAY):
|
|||
except IndexError:
|
||||
# no problem, let's keep searching
|
||||
pass
|
||||
if salt.utils.network.is_ipv6(addr):
|
||||
mac = False
|
||||
if not mac:
|
||||
try:
|
||||
ip = napalm_helpers.convert(napalm_helpers.ip, addr) # pylint: disable=invalid-name
|
||||
|
|
Loading…
Add table
Reference in a new issue