Bug Netrom node Broadcast

@Bug Bash / Thanks to Dave who has fixed the bug (also working on Xfbb) Thanks to Theo how has found the Bug.

There is an (apparently) very old bug in netromd of the linuxax25 tools. This bug ensures that nodes broadcasts on an AX.25 port with paclen <256 do not go out or are incomplete. This is the case in both the original and VE7FET versions.

Syslog get spammend with this kind of messages

Feb  6 14:20:03 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:08 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:13 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:18 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:23 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:28 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:33 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:38 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:20:43 raspberrypi netromd[17311]: netromt: sendto: Message too long
Feb  6 14:35:04 raspberrypi netromd[17320]: netromt: sendto: Message too long
Feb  6 14:35:09 raspberrypi netromd[17320]: netromt: sendto: Message too long
Feb  6 14:35:14 raspberrypi netromd[17320]: netromt: sendto: Message too long
Feb  6 14:35:19 raspberrypi netromd[17320]: netromt: sendto: Message too long

This can be fixed by releasing a patch on the ax25tools/netrom/netromt.c file.

106c106,111
< 
---
> 	int ax_paclen;
> 	
> 	ax_paclen = ax25_config_get_paclen (port_list[port].port);
> 	if (ax_paclen == 0) 
> 		ax_paclen = NODES_PACLEN;	
> 	
183,184c188,189
< 			if (len + ROUTE_LEN > NODES_PACLEN)
< 				break;
---
> 			if (len + ROUTE_LEN > ax_paclen)
> 				break;	
197,198c202,203
< 	/* If the packet was not full then we are done */
< 	} while (len + ROUTE_LEN > NODES_PACLEN);
---
> 	/* If the packet was not full then we are done */	
> 	} while (len + ROUTE_LEN > ax_paclen);

Download the patch

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.