Skip to content

IPV6 mac resolution not working  #84

@cj-andras-tevesz

Description

@cj-andras-tevesz

Describe the bug
IPV6 mac resolution is not working.

To Reproduce

test@ubuntu:$ getmac --version
getmac 0.9.2
test@ubuntu:$ getmac -6 "fd89:6ddf:345a:0:1c32:f2a:c402:3a79"
test@ubuntu:$ ndisc6 "fd89:6ddf:345a:0:1c32:f2a:c402:3a79" wlan0
Soliciting fd89:6ddf:345a:0:1c32:f2a:c402:3a79 (fd89:6ddf:345a:0:1c32:f2a:c402:3a79) on wlan0...
Target link-layer address: A8:51:AB:0F:36:14
from fe80::465:dbcf:6472:189c

test@ubuntu:$ python -m getmac -v -dddd -6 "fd89:6ddf:345a:0:1c32:f2a:c402:3a79"

DEBUG Attempting to populate ARP table with UDP packet to fd89:6ddf:345a:0:1c32:f2a:c402:3a79:55555
DEBUG Initializing 'ip6' method cache (platform: 'linux')
DEBUG 27 methods available: CtypesHost, ArpingHost, ArpFile, SysIfaceFile, FcntlIface, UuidLanscan, GetmacExe, IpconfigExe, WmicExe, ArpExe, DarwinNetworksetupIface, ArpFreebsd, ArpOpenbsd, IfconfigWithIfaceArg, IfconfigEther, IfconfigOther, IpLinkIface, NetstatIface, IpNeighborShow, ArpVariousArgs, UuidArpGetNode, DefaultIfaceLinuxRouteFile, DefaultIfaceIpRoute, DefaultIfaceRouteCommand, DefaultIfaceRouteGetCommand, DefaultIfaceOpenBsd, DefaultIfaceFreeBsd
DEBUG 6 type-filtered methods for 'ip6': ArpFile, ArpFreebsd, ArpOpenbsd, IpNeighborShow, ArpVariousArgs, UuidArpGetNode
DEBUG 4 platform-filtered methods for 'linux' (method_type='ip6'): ArpFile, IpNeighborShow, ArpVariousArgs, UuidArpGetNode
DEBUG 4 tested methods for 'ip6': ArpFile, IpNeighborShow, ArpVariousArgs, UuidArpGetNode
DEBUG Current method cache: {'ip4': 'None', 'ip6': 'ArpFile', 'iface': 'None', 'default_iface': 'None'}
DEBUG Current fallback cache: {'ip4': '[]', 'ip6': '[<getmac.getmac.IpNeighborShow object at 0xffff8af51840>, <getmac.getmac.ArpVariousArgs object at 0xffff8af51810>, <getmac.getmac.UuidArpGetNode object at 0xffff8af517b0>]', 'iface': '[]', 'default_iface': '[]'}
DEBUG Finished initializing 'ip6' method cache
DEBUG Attempting get() (method='ArpFile', method_type='ip6', arg='fd89:6ddf:345a:0:1c32:f2a:c402:3a79')
DEBUG Method 'ArpFile' failed for 'ip6' lookup
DEBUG Raw MAC found: None
DEBUG getmac took 0.0070 seconds

test@ubuntu:$ ip neighbor show "fd89:6ddf:345a:0:1c32:f2a:c402:3a79"
fd89:6ddf:345a:0:1c32:f2a:c402:3a79 dev wlan0 lladdr a8:51:ab:0f:36:14 router STALE

Expected behavior
IPV6 mac resolution for link-local addresses.
Call ip neighbor show if arp file failed
OR
Call ndisc6 https://www.remlab.net/ndisc6/ to do the discovery.

System info
(please complete the following information):

  • Ubuntu 22.04.2 LTS
  • Python 3.10.6
  • getmac 0.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions