Return code for unsolicited arping is 1 instead of 0

Bug #1953014 reported by Christian Rohmann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
iputils (Ubuntu)
Fix Released
Low
Unassigned
Focal
New
Low
Unassigned

Bug Description

When running a gratuitous / unsolicited arp via "arping -U" on Ubuntu Focal
a return code of 1 is given, instead of always 0 (as there is no arp reply expected).

Focal:
--- cut ---
# arping -U -c1 -I eth0 127.0.0.1; echo "ReturnCode: $?"
ARPING 127.0.0.1 from 127.0.0.1 eth0
Sent 1 probes (1 broadcast(s))
Received 0 response(s)
ReturnCode: 1

# arping -V
arping from iputils s20190709
--- cut ---

see corresponding source at https://github.com/iputils/iputils/blob/13e00847176aa23683d68fce1d17ffb523510946/arping.c#L302.

On Ubuntu Bionic this worked fine (and also does on Ubuntu Hirsute again BTW):
--- cut ---
arping -U -c 1 -I eth0 127.0.0.1; echo "ReturnCode: $?"
ARPING 127.0.0.1 from 127.0.0.1 eth0
Sent 1 probes (1 broadcast(s))
Received 0 response(s)
ReturnCode: 0

# arping -V
arping utility, iputils-s20161105
--- cut ---

see corresponding source for that version at https://github.com/iputils/iputils/blob/bffc0e957b98d626ab4cea218c89251201425442/arping.c#L329 or for the version on Hirsute at https://github.com/iputils/iputils/blob/cc16da6b574ce6637f3e6e9ab3c1a728663006ff/arping.c#L302

As you can see by looking at the source arping always statically returns a "0" for unsolicited.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in iputils (Ubuntu):
status: New → Confirmed
Changed in iputils (Ubuntu Focal):
status: New → Confirmed
importance: Undecided → Low
Changed in iputils (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. So it seems fixed in the current version. Could you give a bit details on the impact and why you think it should be fixed in focal?

Changed in iputils (Ubuntu):
status: Confirmed → Fix Released
Changed in iputils (Ubuntu Focal):
status: Confirmed → Incomplete
Revision history for this message
Christian Rohmann (christian-rohmann) wrote :

Thanks Sebastien for getting back to me.

Tools like arping are used as helpers within other tools or scripts. A very important point of integration is the return code. Something returning non-zero is considered to have failed.
It's simply not an option to sell people to add multiple lines of code as workaround for something that is only valid for this version.

Returning the correct return code is just the correct way of handling this issue.

Changed in iputils (Ubuntu Focal):
status: Incomplete → New
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.