Setting CRCmode with kissparms resets other settings

Bug #1943726 reported by Thomas Habets
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ax25-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

`kissparms` lets you set the kernel(?) parameters for the AX.25 KISS TNC. Settings include setting full or half duplex, and CRC mode. The CRC mode defaults to `auto`, which on my setup drops the first two packets, until `auto` can find that it should turn CRC off.

Setting CRC mode will reset other settings, including (but possibly not limited to) duplex.

Steps to reproduce:
1. Run `kissparms -p radio -c 1 -f n`

Expected outcome:

CRC mode off (`-c 1`), AND half duplex (`-f n`).

Actual outcome:

CRC mode off (yay), and full duplex (boo).

I took a look at the code, and because CRC mode is always set after duplex is set (no matter the order on the commandline), it is not possible to combine `-c` and `-f`. Furthermore one must always FIRST set CRC mode with one command (thus enabling full duplex too), and then a separate command only setting half duplex.

I tried looking at the code, but setting CRC mode uses an undocumented magic value of 0x85 as some sort of command.

It's NOT enough to merely move the CRC setting above duplex setting, because then there's still a strange requirement on order if one chooses to run two commands instead of one.

ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: ax25-tools 0.0.10-rc5+git20190411+3595f87-3
ProcVersionSignature: Ubuntu 5.8.0-63.71-generic 5.8.18
Uname: Linux 5.8.0-63-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu50.7
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Sep 15 13:10:38 2021
InstallationDate: Installed on 2021-02-12 (214 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
SourcePackage: ax25-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Habets (p-thomas-8) wrote :
Revision history for this message
Dave Hibberd (hibby) wrote :

Hi there, Debian maintainer here!

I started digging in to this as it's an interesting bug and might explain some issues I've seen.

For 0x85, at least, what I've found is that it's received here:

https://github.com/torvalds/linux/blob/b401b621758e46812da61fa58a67c3fd8d91de0d/drivers/net/hamradio/mkiss.c#L450

Perhaps this is why two arguments fail?

I'll bring it up with upstream!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.