Ping of a link local address with -I as non-root produces "Invalid argument"

Bug #1808428 reported by Ivan Nejgebauer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iputils (Ubuntu)
New
Undecided
Unassigned

Bug Description

iputils-ping 3:20161105-1ubuntu2 amd64 18.04.1 LTS

In the following, "c7" is a host with the link-local address fe80::5054:ff:fe45:1e87.
The mapping is in "/etc/hosts". It is reachable via the "enp2s0" interface on the local
machine. I have masked the local machine's MAC address.

1. As a regular (non-root) user, ping returns "Invalid argument":

$ ping -I enp2s0 c7
PING c7(c7 (fe80::5054:ff:fe45:1e87)) from fe80::xxxx:xxff:fexx:xxxx%enp2s0 enp2s0: 56 data bytes
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument

2. As root, ping works:

# ping -I enp2s0 c7
PING c7(c7 (fe80::5054:ff:fe45:1e87)) from fe80::xxxx:xxff:fexx:xxxx%enp2s0 enp2s0: 56 data bytes
64 bytes from c7 (fe80::5054:ff:fe45:1e87%enp2s0): icmp_seq=1 ttl=64 time=0.285 ms
64 bytes from c7 (fe80::5054:ff:fe45:1e87%enp2s0): icmp_seq=2 ttl=64 time=0.306 ms
64 bytes from c7 (fe80::5054:ff:fe45:1e87%enp2s0): icmp_seq=3 ttl=64 time=0.307 ms

3. Specifying the interface-qualified IPv6 address directly works:

$ ping fe80::5054:ff:fe45:1e87%enp2s0
PING fe80::5054:ff:fe45:1e87%enp2s0(fe80::5054:ff:fe45:1e87%enp2s0) 56 data bytes
64 bytes from fe80::5054:ff:fe45:1e87%enp2s0: icmp_seq=1 ttl=64 time=0.476 ms
64 bytes from fe80::5054:ff:fe45:1e87%enp2s0: icmp_seq=2 ttl=64 time=0.408 ms
64 bytes from fe80::5054:ff:fe45:1e87%enp2s0: icmp_seq=3 ttl=64 time=0.395 ms

Tags: bionic
Ivan Nejgebauer (inejge)
tags: added: bionic
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, that looks similar to the bug fixed in https://github.com/iputils/iputils/pull/100

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.