You are not logged in.

#1 2024-12-28 14:41:48

gcb
Member
Registered: 2014-02-12
Posts: 211

how is ping net_raw implemented on arch?

Noticed it is not setuid or setcap CAP_NET_RAW

$ ls -la /bin/ping
-rwxr-xr-x 1 root root 155160 2024-09-05 20:17 /bin/ping

$ getcap -vr /bin/ping
/bin/ping

how is ping implemented on arch?

Offline

#2 2024-12-28 16:58:51

lmn
Member
Registered: 2021-05-09
Posts: 88
Website

Re: how is ping net_raw implemented on arch?

The package providing ping is iputils. You can check it's implementation on Github.

The reason why ping can bind to a socket is the net.ipv4.ping_group_range parameter. This parameter specifies the guid range for which users are allowed to use icmp.
You can check your value with:

cat /proc/sys/net/ipv4/ping_group_range

Edit: Fixed link

Last edited by lmn (2024-12-28 17:04:00)

Offline

Board footer

Powered by FluxBB