Coder Social home page Coder Social logo

Comments (38)

ThomasHabets avatar ThomasHabets commented on June 11, 2024

I don't have access to a mac. Could you try some previous versions to see if this is a recent regression?

I'll update the docs. libnet 1.2 is fine to use.

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

I have the same problem on 10.15 but not 10.14. Maybe try the new libnet?

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Closing due to no response on my questions.

from arping.

abrvham avatar abrvham commented on June 11, 2024

I have the same issue on MacOS 10.15.2.
Checked previous commits like 2.16 and still have this problem.
libnet 1.1.6

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

@abrvham can you check more versions, to see if this ever worked?

Or if someone else can. Like I said I don't have access to a mac.

Could be that Mac started blocking raw sockets, so that it's not about the libnet or arping version, but about the MacOS version.

from arping.

grahamrb avatar grahamrb commented on June 11, 2024

I was having the same issue on my Mac. I got it working by specifying the interface...

The following gives the same error as others:

sudo arping 192.168.1.1
arping: libnet_init(LIBNET_LINK, <null>): <no error message>

The following works

sudo arping -i en0 192.168.1.1
ARPING 192.168.1.1
60 bytes from XX:XX:XX:XX:XX:XX (192.168.1.1): index=0 time=7.767 msec
60 bytes from XX:XX:XX:XX:XX:XX (192.168.1.1): index=1 time=1.895 msec
60 bytes from XX:XX:XX:XX:XX:XX (192.168.1.1): index=2 time=8.220 msec
^C
--- 192.168.1.1 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
rtt min/avg/max/std-dev = 1.895/5.961/8.220/2.881 ms

(I've XXed out my router's mac address)

running arping 2.20 and libnet 1.1.6. macOS 10.15.2 (19C57).

from arping.

ryandesign avatar ryandesign commented on June 11, 2024

Closing due to no response on my questions.

I don't always have time to babysit the bug reports I file. That doesn't make them invalid or mean that you should close them.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

@ryandesign if nothing is going to happen due with a bug due to insufficient information then there's no point in having it open.

Now that has changed since others have provided more information.

But I'm still waiting for someone to be able to test some older versions of libnet and arping to see if it's a regression of either of those. (don't try libnet 1.0.x, since it's incompatible with 1.1 and newer).

So far there's:

MacOSX libnet arping hw status who
10.3.6 1.1.6 2.20 ? bug
10.15 ? ? ? bug i0ntempest
10.14 ? ? ? ok i0ntempest
10.15.2 1.1.6 2.16 ? bug
10.15.2 1.1.6 2.20 ? bug grhamrb
10.14.6 1.1.6 2.20 macbook pro w/o touchbar ok name-withheld

It's not much to go on. Especially since it may not be version-dependent but configuration-dependent.

Maybe if someone can show the equivalent of strace for mac?

from arping.

grahamrb avatar grahamrb commented on June 11, 2024

I'm running macOS 10.15.2 (19C57) - I assume the last line in your table is related to my comment. I've updated my previous comment to include my OS version.

I did a bit of a google and dtrace (or possibly dtruss) is listed as the equivalent of strace on macOS but I couldn't figure out how to use it. If someone knows what command I need to run I'm happy to run it and drop the output in here.

from arping.

grahamrb avatar grahamrb commented on June 11, 2024

Update... here's the result of running sudo dtruss arping 192.168.1.1

dtrace: system integrity protection is on, some features will not be available

SYSCALL(args) 		 = return
arping: libnet_init(LIBNET_LINK, <null>): <no error message>
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFEE7A7F80)		 = 3 0
ioctl(0x3, 0x80086804, 0x7FFEEE7A7E90)		 = 0 0
close(0x3)		 = 0 0
mprotect(0x101473000, 0x1000, 0x1)		 = 0 0
mprotect(0x10145E000, 0x1000, 0x1)		 = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		 = -1 2
bsdthread_register(0x7FFF6F19382C, 0x7FFF6F193818, 0x2000)		 = 1073742047 0
sysctlbyname(kern.bootargs, 0xD, 0x7FFEEE7A6FA0, 0x7FFEEE7A6F90, 0x0)		 = 0 0
issetugid(0x0, 0x0, 0x0)		 = 0 0
ioctl(0x2, 0x4004667A, 0x7FFEEE7A72E4)		 = 0 0
mprotect(0x10147D000, 0x1000, 0x0)		 = 0 0
mprotect(0x101484000, 0x1000, 0x0)		 = 0 0
mprotect(0x101485000, 0x1000, 0x0)		 = 0 0
mprotect(0x10148C000, 0x1000, 0x0)		 = 0 0
mprotect(0x10147B000, 0x90, 0x1)		 = 0 0
mprotect(0x101464000, 0x1000, 0x1)		 = 0 0
mprotect(0x10147B000, 0x90, 0x3)		 = 0 0
mprotect(0x10147B000, 0x90, 0x1)		 = 0 0
getentropy(0x7FFEEE7A67C0, 0x20, 0x0)		 = 0 0
getentropy(0x7FFEEE7A6810, 0x40, 0x0)		 = 0 0
getpid(0x0, 0x0, 0x0)		 = 41158 0
stat64("/AppleInternal\0", 0x7FFEEE7A7410, 0x0)		 = -1 2
csops_audittoken(0xA0C6, 0x7, 0x7FFEEE7A6F60)		 = -1 22
proc_info(0x2, 0xA0C6, 0xD)		 = 64 0
csops_audittoken(0xA0C6, 0x7, 0x7FFEEE7A67E0)		 = -1 22
socket(0x2, 0x2, 0x0)		 = 3 0
ioctl(0x3, 0xC00C6924, 0x7FFEEE7A40B0)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEEE7A8100)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEEE7A8100)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEEE7A8100)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEEE7A8100)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEEE7A8100)		 = -1 1
close(0x3)		 = 0 0
close(0xFFFFFFFFFFFFFFFF)		 = -1 9
socket(0x2, 0x2, 0x0)		 = 3 0
ioctl(0x3, 0xC0206911, 0x7FFEEE7A7FE0)		 = -1 6
close(0x3)		 = 0 0
close(0xFFFFFFFFFFFFFFFF)		 = -1 9
dtrace: error on enabled probe ID 2185 (ID 953: syscall::write_nocancel:return): invalid kernel access in action #12 at DIF offset 68
getuid(0x0, 0x0, 0x0)		 = 0 0

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Okay... this is weird. arping is working for me on 10.15.2 (iMac 2017) but not working on 10.15.3 beta (Mac mini 2018).
Here's the dtrace message on my Mac mini:

Mac-mini:~ Admin$ sudo dtruss arping 192.168.0.1
SYSCALL(args)            = return
arping: libnet_init(LIBNET_LINK, <null>): <no error message>
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFED4D1F90)             = 3 0
ioctl(0x3, 0x80086804, 0x7FFEED4D1EA0)           = 0 0
close(0x3)               = 0 0
mprotect(0x10276C000, 0x2000, 0x1)               = 0 0
mprotect(0x102788000, 0x1000, 0x1)               = 0 0
mprotect(0x102734000, 0x1000, 0x1)               = 0 0
kdebug_typefilter(0x7FFEED4D1478, 0x7FFEED4D1470, 0x0)           = 0 0
kdebug_trace64(0x2BDC0011, 0x0, 0x0, 0x0, 0x0)           = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)             = -1 Err#2
kdebug_trace64(0x2BDC0010, 0x1, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0x2, 0x0, 0x0, 0x0)           = 0 0
bsdthread_register(0x7FFF6F77282C, 0x7FFF6F772818, 0x2000)               = 1073742047 0
kdebug_trace64(0x2BDC0010, 0x3, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0x4, 0x0, 0x0, 0x0)           = 0 0
sysctlbyname(kern.bootargs, 0xD, 0x7FFEED4D0FB0, 0x7FFEED4D0FA0, 0x0)            = 0 0
kdebug_trace64(0x2BDC0010, 0x5, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0x6, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0x7, 0x0, 0x0, 0x0)           = 0 0
issetugid(0x0, 0x0, 0x0)                 = 0 0
ioctl(0x2, 0x4004667A, 0x7FFEED4D12F4)           = 0 0
mprotect(0x102790000, 0x1000, 0x0)               = 0 0
mprotect(0x10279A000, 0x1000, 0x0)               = 0 0
mprotect(0x10279B000, 0x1000, 0x0)               = 0 0
mprotect(0x1027A5000, 0x1000, 0x0)               = 0 0
mprotect(0x102774000, 0x90, 0x1)                 = 0 0
mprotect(0x10273E000, 0x1000, 0x1)               = 0 0
mprotect(0x102774000, 0x90, 0x3)                 = 0 0
mprotect(0x102774000, 0x90, 0x1)                 = 0 0
getentropy(0x7FFEED4D07D0, 0x20, 0x0)            = 0 0
getentropy(0x7FFEED4D0820, 0x40, 0x0)            = 0 0
kdebug_trace64(0x2BDC0010, 0x8, 0x0, 0x0, 0x0)           = 0 0
getpid(0x0, 0x0, 0x0)            = 24412 0
stat64("/AppleInternal\0", 0x7FFEED4D1420, 0x0)          = -1 Err#2
csops_audittoken(0x5F5C, 0x7, 0x7FFEED4D0F70)            = -1 Err#22
proc_info(0x2, 0x5F5C, 0xD)              = 64 0
kdebug_trace64(0x2BDC0010, 0x9, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0xA, 0x0, 0x0, 0x0)           = 0 0
csops_audittoken(0x5F5C, 0x7, 0x7FFEED4D07F0)            = -1 Err#22
kdebug_trace64(0x2BDC0010, 0xB, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0010, 0xD, 0x0, 0x0, 0x0)           = 0 0
kdebug_trace64(0x2BDC0012, 0x0, 0x0, 0x0, 0x0)           = 0 0
socket(0x2, 0x2, 0x0)            = 3 0
ioctl(0x3, 0xC00C6924, 0x7FFEED4CE0C0)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D2110)           = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEED4D2110)           = -1 Err#1
close(0x3)               = 0 0
close(0xFFFFFFFFFFFFFFFF)                = -1 Err#9
socket(0x2, 0x2, 0x0)            = 3 0
ioctl(0x3, 0xC0206911, 0x7FFEED4D1FF0)           = -1 Err#6
close(0x3)               = 0 0
close(0xFFFFFFFFFFFFFFFF)                = -1 Err#9
write_nocancel(0x2, "arping: libnet_init(LIBNET_LINK, <null>): <no error message>\n\0", 0x3D)            = 61 0
getuid(0x0, 0x0, 0x0)            = 0 0

and here's it on my iMac:

i0ntempest:~ Admin$ sudo dtruss arping -C 3 192.168.0.1
SYSCALL(args) 		 = return
ARPING 192.168.0.1
60 bytes from [MACADDR] (192.168.0.1): index=0 time=218.000 usec
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFE18B1E80)		 = 3 0
ioctl(0x3, 0x80086804, 0x7FFEE18B1D90)		 = 0 0
close(0x3)		 = 0 0
mprotect(0x10E385000, 0x2000, 0x1)		 = 0 0
mprotect(0x10E39C000, 0x1000, 0x1)		 = 0 0
mprotect(0x10E354000, 0x1000, 0x1)		 = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		 = -1 Err#2
bsdthread_register(0x7FFF66CDE82C, 0x7FFF66CDE818, 0x2000)		 = 1073742047 0
sysctlbyname(kern.bootargs, 0xD, 0x7FFEE18B0EA0, 0x7FFEE18B0E90, 0x0)		 = 0 0
issetugid(0x0, 0x0, 0x0)		 = 0 0
ioctl(0x2, 0x4004667A, 0x7FFEE18B11E4)		 = 0 0
mprotect(0x10E3A8000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3AF000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3B0000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3B7000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3B8000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3BF000, 0x1000, 0x0)		 = 0 0
mprotect(0x10E3A6000, 0x90, 0x1)		 = 0 0
mprotect(0x10E38D000, 0x1000, 0x1)		 = 0 0
mprotect(0x10E3A6000, 0x90, 0x3)		 = 0 0
mprotect(0x10E3A6000, 0x90, 0x1)		 = 0 0
getentropy(0x7FFEE18B06C0, 0x20, 0x0)		 = 0 0
getentropy(0x7FFEE18B0710, 0x40, 0x0)		 = 0 0
getpid(0x0, 0x0, 0x0)		 = 99178 0
stat64("/AppleInternal\0", 0x7FFEE18B1310, 0x0)		 = -1 Err#2
csops_audittoken(0x1836A, 0x7, 0x7FFEE18B0E60)		 = -1 Err#22
proc_info(0x2, 0x1836A, 0xD)		 = 64 0
csops_audittoken(0x1836A, 0x7, 0x7FFEE18B06E0)		 = -1 Err#22
socket(0x2, 0x2, 0x0)		 = 3 0
ioctl(0x3, 0xC00C6924, 0x7FFEE18ADFB0)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
ioctl(0x3, 0xC0206911, 0x7FFEE18B2000)		 = 0 0
ioctl(0x3, 0xC0206921, 0x7FFEE18B2000)		 = -1 Err#49
open("/dev/bpf0\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf1\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf2\0", 0x2, 0x0)		 = 4 0
ioctl(0x4, 0x40044271, 0x7FFEE18B2170)		 = 0 0
ioctl(0x4, 0x8020426C, 0x7FFEE18B2178)		 = 0 0
ioctl(0x4, 0x4004426A, 0x7FFEE18B216C)		 = 0 0
sysctl([CTL_NET, 17, 0, 0, 3, 0] (6), 0x0, 0x7FFEE18B2278, 0x0, 0x0)		 = 0 0
sysctl([CTL_NET, 17, 0, 0, 3, 0] (6), 0x7F8C19800000, 0x7FFEE18B2278, 0x0, 0x0) = 0 0
close(0x4)		 = 0 0
socket(0x2, 0x2, 0x0)		 = 4 0
ioctl(0x4, 0xC0206911, 0x7FFEE18B2010)		 = 0 0
close(0x4)		 = 0 0
open("/dev/bpf0\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf1\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf2\0", 0x2, 0x0)		 = 4 0
ioctl(0x4, 0x40044271, 0x7FFEE18B2170)		 = 0 0
ioctl(0x4, 0x8020426C, 0x7FFEE18B2178)		 = 0 0
ioctl(0x4, 0x4004426A, 0x7FFEE18B216C)		 = 0 0
open("/dev/bpf\0", 0x2, 0xFFFFFFFFFFFFFFFF)		 = -1 Err#2
open("/dev/bpf\0", 0x0, 0xFFFFFFFFFFFFFFFF)		 = -1 Err#2
open("/dev/bpf0\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf1\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf2\0", 0x2, 0x0)		 = -1 Err#16
open("/dev/bpf3\0", 0x2, 0x0)		 = 5 0
ioctl(0x5, 0x40044271, 0x7FFEE18B1D48)		 = 0 0
sysctl([CTL_KERN, 1, 0, 0, 0, 0] (2), 0x7FFEE18B1D60, 0x7FFEE18B1CB8, 0x0, 0x0) = 0 0
sysctl([CTL_KERN, 10, 0, 0, 0, 0] (2), 0x7FFEE18B1E60, 0x7FFEE18B1CB8, 0x0, 0x0 = 0 0
sysctl([CTL_KERN, 2, 0, 0, 0, 0] (2), 0x7FFEE18B1F60, 0x7FFEE18B1CB8, 0x0, 0x0) = 0 0
sysctl([CTL_KERN, 4, 0, 0, 0, 0] (2), 0x7FFEE18B2060, 0x7FFEE18B1CB8, 0x0, 0x0) = 0 0
sysctl([CTL_HW, 1, 0, 0, 0, 0] (2), 0x7FFEE18B2160, 0x7FFEE18B1CB8, 0x0, 0x0)	 = 0 0
ioctl(0x5, 0x40044266, 0x7FFEE18B1D5C)		 = 0 0
ioctl(0x5, 0xC0044266, 0x7FFEE18B1D5C)		 = 0 0
ioctl(0x5, 0x8020426C, 0x7FFEE18B2260)		 = 0 0
ioctl(0x5, 0x4004426A, 0x7FFEE18B1D5C)		 = 0 0
ioctl(0x5, 0xC00C4279, 0x7FFEE18B1D30)		 = 0 0
ioctl(0x5, 0xC00C4279, 0x7FFEE18B1D30)		 = 0 0
ioctl(0x5, 0x80044275, 0x7FFEE18B1D40)		 = 0 0
ioctl(0x5, 0x8010426D, 0x7FFEE18B1D20)		 = 0 0
ioctl(0x5, 0x80044270, 0x7FFEE18B1D5C)		 = 0 0
ioctl(0x5, 0x40044266, 0x7FFEE18B1D5C)		 = 0 0
ioctl(0x5, 0x80104267, 0x7FFEE18B1D20)		 = 0 0
shm_open(0x7FFF66CD2290, 0x0, 0x0)		 = 6 0
mmap(0x0, 0x1000, 0x1, 0x1, 0x6, 0x0)		 = 0x10E3C0000 0
close_nocancel(0x6)		 = 0 0
open_nocancel("/etc/.mdns_debug\0", 0x0, 0x0)		 = -1 Err#2
issetugid(0x0, 0x0, 0x0)		 = 0 0
issetugid(0x0, 0x0, 0x0)		 = 0 0
proc_info(0x2, 0x1836A, 0x11)		 = 56 0
proc_info(0x2, 0x1836A, 0x11)		 = 56 0
sysctl([CTL_KERN, 14, 1, 99178, 0, 0] (4), 0x7FFEE18B1D68, 0x7FFEE18B1D58, 0x0, 0x0)		 = 0 0
issetugid(0x0, 0x0, 0x0)		 = 0 0
openat(0xFFFFFFFFFFFFFFFE, "/Library/Preferences/Logging/com.apple.diagnosticd.filter.plist\0", 0x1000104, 0xFFFFFFFFE18B1B38)		 = -1 Err#2
getattrlist("/opt/local/bin/arping\0", 0x7FFEE18B14C0, 0x7FFEE18B14D8)		 = 0 0
access("/opt/local/bin\0", 0x5, 0x0)		 = 0 0
open_nocancel("/opt/local/bin\0", 0x1100004, 0x0)		 = 6 0
sysctlbyname(kern.secure_kernel, 0x12, 0x7FFEE18B0FF4, 0x7FFEE18B0FF8, 0x0)	 = 0 0
fstatfs64(0x6, 0x7FFEE18B0FF8, 0x0)		 = 0 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8160 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8184 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8168 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8184 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8152 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8168 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8152 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8184 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8184 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 8176 0
getdirentries64(0x6, 0x7F8C1A000800, 0x2000)		 = 4904 0
close_nocancel(0x6)		 = 0 0
access("/opt/local\0", 0x5, 0x0)		 = 0 0
open_nocancel("/opt/local\0", 0x1100004, 0x0)		 = 6 0
fstatfs64(0x6, 0x7FFEE18B0FF8, 0x0)		 = 0 0
getdirentries64(0x6, 0x7F8C19804200, 0x2000)		 = 520 0
close_nocancel(0x6)		 = 0 0
access("/opt\0", 0x5, 0x0)		 = 0 0
open_nocancel("/opt\0", 0x1100004, 0x0)		 = 6 0
fstatfs64(0x6, 0x7FFEE18B0FF8, 0x0)		 = 0 0
getdirentries64(0x6, 0x7F8C19804200, 0x2000)		 = 176 0
close_nocancel(0x6)		 = 0 0
access("/opt/local/bin\0", 0x4, 0x0)		 = 0 0
open("/opt/local/bin\0", 0x0, 0x0)		 = 6 0
fstat64(0x6, 0x7F8C18F00100, 0x0)		 = 0 0
csrctl(0x0, 0x7FFEE18B177C, 0x4)		 = -1 Err#1
__mac_syscall(0x7FFF66CECA47, 0x2, 0x7FFEE18B1798)		 = 0 0
fcntl(0x6, 0x32, 0x7FFEE18B13F0)		 = 0 0
close(0x6)		 = 0 0
open("/opt/local/bin/Info.plist\0", 0x0, 0x0)		 = -1 Err#2
chdir("/var/empty\0", 0x0, 0x0)		 = 0 0
chroot("/var/empty\0", 0x0, 0x0)		 = 0 0
setgroups(0x0, 0x0, 0x0)		 = 0 0
setgid(0xFFFFFFFE, 0x0, 0x0)		 = 0 0
setuid(0xFFFFFFFE, 0x0, 0x0)		 = 0 0
fcntl(0x5, 0x3, 0x0)		 = 2 0
fcntl(0x5, 0x4, 0x6)		 = 0 0
ioctl(0x5, 0x80044270, 0x7FFEE18B25F0)		 = 0 0
sigprocmask(0x1, 0x0, 0x7FFEE18B0AF0)		 = 0x0 0
sigaltstack(0x0, 0x7FFEE18B0AE0, 0x0)		 = 0 0
sigprocmask(0x1, 0x0, 0x7FFEE18B0AC0)		 = 0x0 0
sigaltstack(0x0, 0x7FFEE18B0AB0, 0x0)		 = 0 0
sigprocmask(0x1, 0x0, 0x7FFEE18B1F10)		 = 0x0 0
sigaltstack(0x0, 0x7FFEE18B1F00, 0x0)		 = 0 0
ioctl(0x5, 0x80104267, 0x7FFEE18B2348)		 = 0 0
sysctl([CTL_NET, 17, 0, 18, 3, 0] (6), 0x0, 0x7FFEE18B22D8, 0x0, 0x0)		 = 0 0
sysctl([CTL_NET, 17, 0, 18, 3, 0] (6), 0x7F8C1A000800, 0x7FFEE18B22D8, 0x0, 0x0 = 0 0
socket(0x2, 0x2, 0x0)		 = 6 0
ioctl(0x6, 0xC0206921, 0x7FFEE18B22E8)		 = 0 0
close(0x6)		 = 0 0
sigaction(0x2, 0x7FFEE18B22E8, 0x7FFEE18B2310)		 = 0 0
getrlimit(0x1008, 0x7FFEE18B2030, 0x0)		 = 0 0
fstat64(0x1, 0x7FFEE18B2018, 0x0)		 = 0 0
ioctl(0x1, 0x4004667A, 0x7FFEE18B2064)		 = 0 0
write_nocancel(0x1, "ARPING 192.168.0.1\n\0", 0x13)		 = 19 0
write(0x4, "\377\377\377\377\377\377\250`\266<\311\273\b\006\0", 0x3A)		 = 58 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\264.\036^\304\221\0", 0x80000)		 = 76 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\264.\036^\211\222\0", 0x80000)		 = 78 0
write_nocancel(0x1, "60 bytes from [MACADDR] (192.168.0.1): index=0 time=218.000 usec\0", 0x48)		 = 72 0
write_nocancel(0x1, "\n\0", 0x1)		 = 1 0
60 bytes from [MACADDR] (192.168.0.1): index=1 time=315.000 usec
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 0 0
write(0x4, "\377\377\377\377\377\377\250`\266<\311\273\b\006\0", 0x3A)		 = 58 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\265.\036^\336\226\0", 0x80000)		 = 76 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\265.\036^\333\227\0", 0x80000)		 = 78 0
write_nocancel(0x1, "60 bytes from[MACADDR] (192.168.0.1): index=1 time=315.000 usec\0", 0x48)		 = 72 0
write_nocancel(0x1, "\n\0", 0x1)		 = 1 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\265.\036^*o\v\0", 0x80000)		 = 140 0
60 bytes from [MACADDR] (192.168.0.1): index=2 time=317.000 usec

--- 192.168.0.1 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
rtt min/avg/max/std-dev = 0.218/0.283/0.317/0.046 ms
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 0 0
write(0x4, "\377\377\377\377\377\377\250`\266<\311\273\b\006\0", 0x3A)		 = 58 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\266.\036^\032\236\0", 0x80000)		 = 76 0
select(0x6, 0x7FFEE18B2220, 0x0, 0x0, 0x7FFEE18B22A0)		 = 1 0
read(0x5, "\266.\036^*\237\0", 0x80000)		 = 78 0
write_nocancel(0x1, "60 bytes from [MACADDR] (192.168.0.1): index=2 time=317.000 usec\0", 0x48)		 = 72 0
write_nocancel(0x1, "\n\0", 0x1)		 = 1 0
write_nocancel(0x1, "\n\0", 0x1)		 = 1 0
write_nocancel(0x1, "--- 192.168.0.1 statistics ---\n\0", 0x1F)		 = 31 0
write_nocancel(0x1, "3 packets transmitted, 3 packets received,   0% unanswered (0 extra)\n\0", 0x45)		 = 69 0
write_nocancel(0x1, "rtt min/avg/max/std-dev = 0.218/0.283/0.317/0.046 ms\n\0", 0x35)		 = 53 0

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

That close(0xFFFFF…) is probably a bug in libnet (or libpcap), trying to re-close after already closing. Shouldn't be the cause, but just something extra wrong in the error handling.

What other differences could there be between your two macs? Could it be that you have interfaces on the buggy one that are UP, but not actually in use, and it's a problem similar to #2 ?

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

I just tried marking all interfaces down except for en0 ethernet and lo0 on my Mac mini, and I found one interface en12 that says permission denied when I try to disable it. This could be related to the T2 chip but I'm not sure. When searching Google I found another interface that cannot be disabled in macOS is related to iBridge which is used by the Touch Bar. (Source: https://stackoverflow.com/questions/50520202)
When trying en12 with arping it returns:
arping: libnet_init(LIBNET_LINK, en12): libnet_open_link(): BIOCSETIF: (en12): Device not configured
and when trying with en0 it works as expected.
So, maybe try asking people here if their Mac has T2 or Touch Bar?

EDIT: According to Apple's HT208862, T2 is also part of iBridge.

from arping.

ryandesign avatar ryandesign commented on June 11, 2024

Mine is a 15" 2016 MacBook Pro with Touch Bar. The MacPorts user who originally reported the problem to me has a 15" 2017 MacBook Pro, which I assume means it also has a Touch Bar.

I do have many network interfaces configured which I am not using right this second: VPNs, USB Ethernet adapter, iPhone tethering configuration, Bluetooth, in addition to the wifi on en0 that I am using. I don't know if those other interfaces are "up" but some of them do show as "active" in ifconfig, if that's the same thing.

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

The out put of defaults read /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist confirms this:

{
            Active = 1;
            "BSD Name" = en12;
            IOBuiltin = 0;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 12;
            IOMACAddress = {length = 6, bytes = 0xacde48001122};
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP17@1B/IOPP/IOBC@0,1/IOBufferCopyController/AppleUSBVHCIBCE@80000000/AppleUSBVHCIPort@80100000/Apple T2 Controller@80100000/NCM Data@1/AppleUSBNCMData/en12";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = iBridge;
                idProduct = 33331;
                idVendor = 1452;
                kUSBProductString = "Apple T2 Controller";
            };
            SCNetworkInterfaceType = Ethernet;
        },

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

I've updated the table above, but it's probably easier if people populate some data themselves. Here's a google sheet I started.

It makes sense that special interfaces like this T2 thing doesn't work to arping with. It could be that libnet's default interface-picker picks it.

It's probably not hard to troubleshoot with gdb or something for someone who actually has a setup that fails. I just don't have one.

But then I'd expect that the fix should actually go in libnet. Hmm… actually let me file a bug there and see if anyone there can help.

from arping.

krishnablr avatar krishnablr commented on June 11, 2024

sudo arping -i en0 192.168.1.1

This worked for me

Thanks to @grahamrb

But looks like a bug, needs to be fixed, the error I get is

arping 192.168.8.128
Password:
arping: libnet_init(LIBNET_LINK, ): libnet_ifaddrlist(): SIOCGIFADDR: dev=en5: Operation not permitted

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

@krishnablr is that second command running without sudo? If so then operation not permitted is expected.

from arping.

krishnablr avatar krishnablr commented on June 11, 2024

NO, its with Sudo, i have put the complete command. Also with Root prompt

Krishnas-MacBook-Pro:Homebrew kishan$ sudo arping 192.168.8.128
Password:
arping: libnet_init(LIBNET_LINK, <null>): libnet_ifaddrlist(): SIOCGIFADDR: dev=en5: Operation not permitted
You have new mail in /var/mail/kishan
Krishnas-MacBook-Pro:Homebrew kishan$ 

Executing in Root prompt

Krishnas-MacBook-Pro:Homebrew kishan$ sudo su - 
Krishnas-MacBook-Pro:~ root# /usr/local/sbin/arping 192.168.8.128
arping: libnet_init(LIBNET_LINK, <null>): libnet_ifaddrlist(): SIOCGIFADDR: dev=en5: Operation not permitted
Krishnas-MacBook-Pro:~ root# 

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

I don't have access to a mac, so that's why nothing is happening here. :-(

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

I think at this point we've pretty much figured out the T2 interface is causing the issue (to add on that my two Hackintoshes don't have this problem), so imo a workaround would be having a config file and allowing disabling certain interfaces in it (or set a default one), before there's a way for detecting such interface in the program.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Is there a way to check if an interface is the T2 one? E.g. in this thread for some it's en12, for others en5.

Could you run again with -vvvvv to increase verbosity? There may be a way for arping to work around this.
I've created a brach with some experiments. Could you also run with -vvvvv after building the macfix branch?

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Actually that interfaced has changed to en8 (iirc) on my system. I’ll try that branch when I get to my mini.

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Did what u said:

$ sudo /Users/Admin/Downloads/arping/install_dir/usr/local/sbin/arping -vvvvv 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(LIBNET_LINK, lo): libnet_check_iface() ioctl: Device not configured

It's similar to if I manually select the T2 interface with 2.21:

$ sudo arping -vvvvv -i en8 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(en8)
arping: libnet_init(LIBNET_LINK, en8): libnet_open_link(): BIOCSETIF: (en8): Device not configured

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

T2 interface has this block in /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist:

            SCNetworkInterfaceInfo =             {
                UserDefinedName = iBridge;
                idProduct = 33331;
                idVendor = 1452;
                kUSBProductString = "Apple T2 Controller";
            };

These should be the same across all T2 Mac models (@ryandesign can u pls check on your MBP? Would also be great to see the info about TouchBar interface), so I believe you can detect T2 interface by parsing that plist and finding the entry that has these.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

But device not configured on lo? That's strange. Is the interface not called that on mac? Oh, it's lo0?

Try with the macfix branch again now. You did last time? I expected more debug output on the macfix branch than that.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Could you share your config.log?

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Sorry for taking so long I was out on a trip. I just tried that branch and it still only shows 2 lines of debug info even if I pass -vvvvv, except this time it does this even if I specify the interface known to work with version 2.21.

$ sudo install_dir/usr/local/sbin/arping -vvvvv -i en6 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(LIBNET_LINK, lo): libnet_check_iface() ioctl: Device not configured

^macfix branch

$ sudo arping -i en6 -vvvvv 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(en6)
arping: libnet_init(en6)
Timestamp types:
  Name               Description
  host               Host
arping: Successfully chrooted to /var/empty
arping: Successfully dropped uid/gid to -2/-2.
arping: pcap_get_selectable_fd(): 4
This box:   Interface: en6  IP: 192.168.0.4   MAC address: 00:01:55:17:12:78
ARPING 192.168.0.1
arping: sending packet at time 63264.749378000
arping: receiving packets...
arping: listen for replies for 1.000000000 sec
arping: received response for IP ping
arping: listen for replies for 0.999964000 sec
arping: received response for IP ping
arping: ... packet is ARP reply
arping: ... from IPv4 address
arping: ... to Ethernet address
arping: ... sent by acceptable host
arping: ... destination is the source we used
arping: ... for the right IPv4 address!
60 bytes from 24:4b:fe:ab:63:08 (192.168.0.1): index=0 time=281.000 usec
arping: listen for replies for 0.999705000 sec
arping: sending packet at time 63265.752058000
arping: receiving packets...
arping: listen for replies for 1.000000000 sec
arping: received response for IP ping
arping: listen for replies for 0.999952000 sec
arping: received response for IP ping
arping: ... packet is ARP reply
arping: ... from IPv4 address
arping: ... to Ethernet address
arping: ... sent by acceptable host
arping: ... destination is the source we used
arping: ... for the right IPv4 address!
60 bytes from 24:4b:fe:ab:63:08 (192.168.0.1): index=1 time=315.000 usec
arping: listen for replies for 0.999669000 sec
arping: sending packet at time 63266.756611000
arping: receiving packets...
arping: listen for replies for 0.999999000 sec
arping: received response for IP ping
arping: listen for replies for 0.999915000 sec
arping: received response for IP ping
arping: ... packet is ARP reply
arping: ... from IPv4 address
arping: ... to Ethernet address
arping: ... sent by acceptable host
arping: ... destination is the source we used
arping: ... for the right IPv4 address!
60 bytes from 24:4b:fe:ab:63:08 (192.168.0.1): index=2 time=385.000 usec
arping: listen for replies for 0.999599000 sec
^Carping: listen for replies for 0.731933000 sec

--- 192.168.0.1 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
rtt min/avg/max/std-dev = 0.281/0.327/0.385/0.043 ms

^ version 2.21
That en6 is my primary ethernet interface.
config.log here:
config.log

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

What about if you don't specify an interface?

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Oh, and update the macfix branch, I made a small change.

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

It now gives even less info.
No interface specified:

$ sudo install_dir/usr/local/sbin/arping -vvvvv 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(LIBNET_LINK, lo):

With T2 interface:

$ sudo install_dir/usr/local/sbin/arping -vvvvv -i en8 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(LIBNET_LINK, lo):

And even with my primary ethernet interface;

$ sudo install_dir/usr/local/sbin/arping -vvvvv -i en6 192.168.0.1
arping: clock_getres() = 0s 1000ns
arping: libnet_init(LIBNET_LINK, lo): 

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

I think this needs me (or someone who wants to try fixing the code) to have access to a mac, instead of making a hopeful change and waiting.

Seems AWS has dedicated macs for just over $1 per hour, which is reasonable. I should be able to find some time this week for this.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Doh, with a 24h minimum time, though. Now it's harder to schedule some time for that. :-(

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Coming back to say v2.23 is working on my Mac mini with T2 on macOS 12.3 without specifying an interface.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

2.23 works, and 2.22 does not?

Can others on the this bug also check, please?

from arping.

i0ntempest avatar i0ntempest commented on June 11, 2024

Right, 2.22 does not work on the same machine (without specifying an interface).

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

Thanks. I guess the fix for OpenBSD was the right fix for mac too.

Closing this for now. If it's still a problem for others we can reopen.

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

I believe the OpenBSD fix past me was referring to was 3cad228.

from arping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.