I'm sorry for a question slighly unrelated (but still related) to iputils...
I have a program which is creating user-space ICMP sockets using the pattern (on IPv4) socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP). In order for this to work (on CentOS), I must first enable the capability by sysctl -w net.ipv4.ping_group_range = "0 9999". Even root (on CentOS at least) cannot create such a user-space socket until that setting is changed. That's all fine, so far so good, it works if that setting is changed.
However, when I try to construct an IPv6 socket, socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6), the socket creation fails. I assumed there must be a comparable sysctl setting for IPv6, e.g. ````sysctl -w net.ipv6.ping_group_range = "0 9999"``. However, there is no such kernel parameter.
Googling revealed that such a patch was proposed in 2013, but after some small discussion the submitter concluded with:
I think we can just ignore the patch for now, we can add it if someone requests for it in future.
So, my question is, without such a kernel parameter, how is it that iputils can create an IPv6 SOCK_DGRAM/IPPROTO_ICMPV6 socket at all? How does it succeed? Am I missing something fundamental?
I'm sorry for a question slighly unrelated (but still related) to iputils...
I have a program which is creating user-space ICMP sockets using the pattern (on IPv4)
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP). In order for this to work (on CentOS), I must first enable the capability bysysctl -w net.ipv4.ping_group_range = "0 9999". Even root (on CentOS at least) cannot create such a user-space socket until that setting is changed. That's all fine, so far so good, it works if that setting is changed.However, when I try to construct an IPv6 socket,
socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6), the socket creation fails. I assumed there must be a comparable sysctl setting for IPv6, e.g. ````sysctl -w net.ipv6.ping_group_range = "0 9999"``. However, there is no such kernel parameter.Googling revealed that such a patch was proposed in 2013, but after some small discussion the submitter concluded with:
So, my question is, without such a kernel parameter, how is it that
iputilscan create an IPv6 SOCK_DGRAM/IPPROTO_ICMPV6 socket at all? How does it succeed? Am I missing something fundamental?