Sitelet https://github.com/iputils/iputils/pull/360
Skip to content

arping: Fix ARP protocol field for AX.25 and NETROM - #360

Closed
ralfbaechle wants to merge 1 commit into
iputils:masterfrom
ralfbaechle:arping-ax25-fix-2021-07-27
Closed

ralfbaechle wants to merge 1 commit into
iputils:masterfrom
ralfbaechle:arping-ax25-fix-2021-07-27

Conversation

@ralfbaechle

@ralfbaechle ralfbaechle commented Jul 27, 2021 •

Copy link
Copy Markdown
Contributor

AX.25 and NETROM differ from other, more ethernet-like protocols in that
they are not using a DIX protocol number but the AX.25 PID. The arping code
doesn't handle this special case resulting in invalid ARP packets being sent.

The interface bpq0 is an AX.25-over-ethernet interface. Without this
fix:

# arping -c 1 -I bpq0 172.20.1.3
ARPING 172.20.1.3 from 172.20.1.2 bpq0
Sent 1 probes (1 broadcast(s))
Received 0 response(s)

With this fix:

# arping -c 1 -I bpq0 172.20.1.3
ARPING 172.20.1.3 from 172.20.1.2 bpq0
Unicast reply from 172.20.1.3 [88:98:60:A0:92:40:02] 1.402ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

Signed-off-by: Ralf Baechle ralf@linux-mips.org

AX.25 and NETROM differ from other, more ethernet-like protocols in that
they are not using a DIX protocol number but the AX.25 PID.  The arping code
doesn't handle this special case resulting in invalid ARP packets being sent.

The interface bpq0 is an AX.25-over-ethernet interface.  Without this
fix:

# arping -c 1 -I bpq0 172.20.1.3
ARPING 172.20.1.3 from 172.20.1.2 bpq0
Sent 1 probes (1 broadcast(s))
Received 0 response(s)

With this fix:

# arping -c 1 -I bpq0 172.20.1.3
ARPING 172.20.1.3 from 172.20.1.2 bpq0
Unicast reply from 172.20.1.3 [88:98:60:A0:92:40:02]  1.402ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
@pevik

pevik commented Jul 27, 2021

Copy link
Copy Markdown
Contributor

Reviewed-by: Petr Vorel <pvorel@suse.cz>

@pevik

pevik commented Jul 27, 2021 •

Copy link
Copy Markdown
Contributor

@ralfbaechle I suppose there is no virtual driver for AX25 in the linux kernel, right? Something like vxcan, vxlan. At least net/ax25/Kconfig does not mention any. I'd be surprised (it'd be probably hard to implement and it'd have to be under drivers/net/), but asking just in case.

@ralfbaechle

Copy link
Copy Markdown
Contributor Author

@ralfbaechle I suppose there is no virtual driver for AX25 in the linux kernel, right? Something like vxcan, vxlan. At least net/ax25/Kconfig does not mention any. I'd be surprised, but asking just in case.

What you want is probably the bpqether driver. BPQ (which isn't an acronym but the suffix of the ham radio callsign of the original developer) is a simple AX.25-over-ethernet encapsulation method. To use it you only need to load the bpqether kernel module.
To enable, first enable CONFIG_HAMRADIO, CONFIG_AX25 and finally CONFIG_BPQETHER.
Loading the bpqether module then will create a bpq%d device for every ethernet device in the system. Which is crazy but that's the way they did it in the old days and I have patches to clean that up. Btw. you need to use ifconfig to configure the AX.25 bits of a bpq device. Ip(8) from iproute2 doesn't support that yet. I have patches for that and the associated kernel bits as well in the queue to be posted.

@pevik pevik closed this in 4646703 Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants