Benjamin Thery 999890b21a net: /proc/net/ip_mr_cache, display Iif as a signed short
Today, iproute2 fails to show multicast forwarding unresolved cache
entries while scanning /proc/net/ip_mr_cache.

Indeed, it expects to see -1 in 'Iif' column to identify unresolved
entries but the kernel outputs 65535. It's a signed/unsigned issue:

'Iif', the source interface, is retrieved from member mfc_parent in
struct mfc_cache. mfc_parent is a vifi_t: unsigned short, but is
displayed in ipmr_mfc_seq_show() as "%-3d", signed integer.

In unresolevd entries, the 65535 value (0xFFFF) comes from this define:
#define ALL_VIFS    ((vifi_t)(-1))

That may explains why the guy who added support for this in iproute2
thought a -1 should be expected.

I don't know if this must be fixed in kernel or in iproute2. Who is
right? What is the correct API? How was it designed originally?

I let you decide if it should goes in the kernel or be fixed in iproute2.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03 22:22:16 -08:00
..
2008-11-23 15:42:23 -08:00
2008-11-25 17:59:27 -08:00
2008-07-16 20:20:11 -07:00
2008-11-03 02:48:48 -08:00
2008-11-25 17:59:27 -08:00
2008-11-25 17:35:18 -08:00
2008-11-03 00:26:09 -08:00
2008-11-03 18:21:05 -08:00
2008-11-25 17:30:50 -08:00
2008-10-07 08:38:24 +11:00
2008-10-07 08:38:24 +11:00
2008-06-11 21:00:38 -07:00
2008-11-25 17:35:18 -08:00
2008-11-03 18:21:05 -08:00
2008-11-02 00:28:10 -07:00
2008-11-12 01:41:09 -08:00