RE: dhcpcd dumplease reports "dhcpcd not running"
Matthew Clarkson
Thu Nov 19 16:49:59 2020
We are using glibc 2.3.0. I'm pretty sure that it is related to the terminal being used. When connected with ssh there is no ioctl call, but when using a serial terminal there is. Also, with TCGETS added to the filter, the strace of the ioctl is ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0, the third argument is definitely related to our serial port configuration: B115200 is the baud rate. I haven't found the exact line of code, but I feel like it's understandable now.
So far adding fcntl64, fstat64, and TCGETS to the filter is working reliably.
Thanks for the help on this one.
-----Original Message-----
From: Roy Marples <roy@xxxxxxxxxxxx>
Sent: Thursday, November 19, 2020 7:41 AM
To: Matthew Clarkson <mclarkson@xxxxxxxxxxxxxxxxxxxx>
Cc: dhcpcd-discuss@xxxxxxxxxxxx
Subject: Re: dhcpcd dumplease reports "dhcpcd not running"
Hi Matthew
On 18/11/2020 19:55, Matthew Clarkson wrote:
> After looking at strace and digging around a bit, it looks like the ioctl is coming from the printf call in the script_dump function in script.c
>
> Adding TCGETS to the ioctl options allowed appears to work, a patch is attached. I'm not sure if that is something that should always be in the filter or ifdef'd to limit to specific platforms, but it works for ours.
Well, that is a nice find, but equally unexpected.
What libc are you using?
Anyway, comitted here:
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=ddbfa730262d958f1fc7707b27c245b350834b4f
Let me know if it works reliably. There will be a new release coming shortly!
Roy
Archive administrator: postmaster@marples.name