Skip to content

ping IPv6 sendmsg: network is unreachable, not working on Linux #189

@AlexandreYang

Description

@AlexandreYang

Describe the bug

Rshell behaviour, not working on LINUX:

rshell$ ping -6 dns.google.com
PING dns.google.com (2001:4860:4860::8844): 56 data bytes

--- dns.google.com ping statistics ---
0 packets transmitted, 0 received, 0.0% packet loss
ping: write ip ::->2001:4860:4860::8844: sendmsg: network is unreachable

Rshell behaviour for IPv6 works on macOS:

§ go run cmd/rshell/main.go --allow-all-commands  -c 'ping -6 dns.google.com'
PING dns.google.com (2001:4860:4860::8844): 56 data bytes
64 bytes from 2001:4860:4860::8844: icmp_seq=1 ttl=251 time=7.977 ms
64 bytes from 2001:4860:4860::8844: icmp_seq=2 ttl=251 time=7.458 ms
64 bytes from 2001:4860:4860::8844: icmp_seq=3 ttl=251 time=5.626 ms
64 bytes from 2001:4860:4860::8844: icmp_seq=4 ttl=251 time=6.406 ms

--- dns.google.com ping statistics ---
4 packets transmitted, 4 received, 0.0% packet loss
round-trip min/avg/max/stddev = 5.626/6.866/7.977/0.912 ms

MacOS ping6 behaviour (working):

ping6 -c 4 dns.google.com
PING6(56=40+8+8 bytes) 2a01:cb00:26c:1100:196a:45fb:784d:87d4 --> 2001:4860:4860::8844
16 bytes from 2001:4860:4860::8844, icmp_seq=0 hlim=251 time=7.370 ms
16 bytes from 2001:4860:4860::8844, icmp_seq=1 hlim=251 time=5.381 ms
16 bytes from 2001:4860:4860::8844, icmp_seq=2 hlim=251 time=4.675 ms
16 bytes from 2001:4860:4860::8844, icmp_seq=3 hlim=251 time=5.712 ms

--- dns.google.com ping6 statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 4.675/5.785/7.370/0.989 ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions