Re: ax25: zero length frame filtering in AX25

From: Alan Cox
Date: Fri Mar 27 2009 - 06:25:40 EST


> In previous commit 244f46ae6e9e18f6fc0be7d1f49febde4762c34b
> was introduced a zero length frame filter for ROSE protocole.
> This patch has the same purpose at AX25 frame level for the same
> reason. Empty frames have no meaning in AX25 protocole.

That isn't actually true. A zero (user data) length AX.25 frame has
meaning because AX.25 is a LAPB variant so preserves frame boundaries. In
AX.25 a 0 length write and read are both legitimate activities even if
the socket API has a problem with it. Viz a 0 length send causes a 0
length receive which is passing a message boundary.

This code is even more wrong because it is applied to both datagram and
sequenced connections. In datagram mode a zero data frame most definitely
has meaning, is valid in both directions and can be used very
successfully for beaconing (indicating your presence)

(Fortunately the socket API can handle this as the DECnet folks at
Digital discovered and documented)

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/