Skip to contentSkip to conversation

iproute2: Issue with link type link/generic for NETROM links

PATCH Ralf Baechle 2 participants 2 messages Apr 4, 2019 – Apr 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

For a NETROM "ip link show dev nr0" will show

4: nr0: <NOARP,UP,LOWER_UP> mtu 236 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

    link/generic 88:98:6a:a4:84:40:0a brd 00:00:00:00:00:00:00

But rather link/netrom is expected to be displayed.

I have below patch to change ip such that link/netrom will be displayed but I'm wondering if it's going to cause non-obvious breakage or would be acceptable?

Thanks,

Ralf

 lib/ll_types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/ll_types.c +1 -1
index bd8893ed..32d04b5a 100644
@@ -32,7 +32,7 @@ static const struct {
 	int type;
 	const char *name;
 } arphrd_names[] = {
-{ 0, "generic" },
+__PF(NETROM,netrom)
 __PF(ETHER,ether)
 __PF(EETHER,eether)
 __PF(AX25,ax25)
#1 lore raw
Quoted 25 lines · On Thu, 4 Apr 2019 12:21:54 +0200 Ralf Baechle <[email protected]> wrote:

For a NETROM "ip link show dev nr0" will show

4: nr0: <NOARP,UP,LOWER_UP> mtu 236 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

    link/generic 88:98:6a:a4:84:40:0a brd 00:00:00:00:00:00:00

But rather link/netrom is expected to be displayed.

I have below patch to change ip such that link/netrom will be displayed but I'm wondering if it's going to cause non-obvious breakage or would be acceptable?

Thanks,

Ralf

 lib/ll_types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/ll_types.c +0 -0
index bd8893ed..32d04b5a 100644

lib/ll_types.c static const struct { · line 38

Quoted 8 lines
lib/ll_types.c +1 -1
@@ -32,7 +32,7 @@ static const struct {
 	int type;
 	const char *name;
 } arphrd_names[] = {
-{ 0, "generic" },
+__PF(NETROM,netrom)
 __PF(ETHER,ether)
 __PF(EETHER,eether)
 __PF(AX25,ax25)

Looks ok to me, but was a little concerned that it might break something else. Will merge it and see.