Bug 963927 - arping is not compatible with network namespaces
arping is not compatible with network namespaces
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iputils (Show other bugs)
6.4
Unspecified Unspecified
high Severity high
: rc
: 6.5
Assigned To: Jan Synacek
qe-baseos-daemons
: Patch, ZStream
Depends On:
Blocks: 880142 883504 968342 971672
  Show dependency treegraph
 
Reported: 2013-05-16 15:14 EDT by Maru Newby
Modified: 2016-04-26 09:53 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-14 05:37:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
workaround patch (615 bytes, patch)
2013-05-16 18:54 EDT, Thomas Graf
no flags Details | Diff
[Patch] fall back when sysfs broadcast file is not readable (1.10 KB, patch)
2013-05-22 03:10 EDT, Jan Synacek
no flags Details | Diff

  None (edit)
Description Maru Newby 2013-05-16 15:14:52 EDT
Description of problem:

Attempting to invoke arping in a network namespace (presuming a netns-supporting kernel and iproute2 have been ocnfigured) does not work.


Version-Release number of selected component (if applicable):


How reproducible:

Consistent.


Steps to Reproduce:

1. Install a netns-supporting kernel/kernel-firmware/iproute.
2. Add a namespace: ip netns add namespace1
3. Add a veth pair: ip link add v0 type veth peer name v1 netns namespace1
4. Bring the netns device up: ip netns namespace1 exec ip link set v1 up
5: Invoke arping in the namespace on any ip: ip netns namespace1 arping -A -U -I v1 192.168.1.1

  
Actual results:

Stderr: 'sysfs read broadcast value: No such file or directory'


Expected results:

ARPING 192.168.1.1 from 192.168.1.1 veth0
Sent 3 probes (3 broadcast(s))
Received 0 response(s)


Additional info:
Comment 3 Thomas Graf 2013-05-16 18:54:27 EDT
Created attachment 749104 [details]
workaround patch

The background for this is that the netns backport for 6.5 is not complete and does not include the sysfs bits. This leads to the /sys/class/net/$DEV/ directory not being available in the non default netns. arping reads its broadcast address via sysfs.

The following workaround has been used successfully in combination with the netns backport and RHOS. It's a POC patch that should be converted into a fallback alternative if the sysfs broadcast file is not available, i.e. fall back to using a default broadcast address of '-1' if the broadcast address can't be read.

Alternatively the broadcast address could be read from a source other than sysfs, e.f. by parsing the output of 'ip link' or by issueing a netlink request which are both netns aware.
Comment 5 Jan Synacek 2013-05-21 03:52:42 EDT
Thomas, is there a possibility that the broadcast address could be anything else than all 0xff's? I'm not aware that it happens, so I think that the workaround patch is ok to apply, *as long as it gets removed once the netns backport is completed*.
Comment 6 Thomas Graf 2013-05-21 07:04:59 EDT
(In reply to Jan Synacek from comment #5)
> Thomas, is there a possibility that the broadcast address could be anything
> else than all 0xff's? I'm not aware that it happens, so I think that the
> workaround patch is ok to apply, *as long as it gets removed once the netns
> backport is completed*.

It could differ but only in very rare situations. What seems to be the best option forward is to fall back to all 0xff's if the sysfs file cannot be read.
Comment 7 Jan Synacek 2013-05-21 07:07:46 EDT
I agree. I'll write a patch doing exactly that.
Comment 8 Jan Synacek 2013-05-21 07:15:37 EDT
I'm setting the old needinfo flags that should have stayed there back.
Comment 10 Jan Synacek 2013-05-22 03:10:11 EDT
Created attachment 751541 [details]
[Patch] fall back when sysfs broadcast file is not readable

Note You need to log in before you can comment on or make changes to this bug.