[dhcpcd-6.11.2] dhcpcd ignores control command
Okamoto, Koichi
Wed Oct 12 08:10:51 2016Hello Roy san,
I try to fix the issue that control command is ignored.
The following steps cause this issue:
Step1. dhcpcd -M -b wlan0
Step2. dhcpcd --exit wlan0
Step3. dhcpcd -M -S ip_address=192.168.XX.YY/24
-S routers=192.168.XX.1
-S domain_name_servers="192.168.XX.ZZ 192.168.XX.AA"
wlan0
Step3 command will be ignored due to some sequence using "struct
dhcpcd_ctx ctx" member such as ctx.argc and ctx.argv" which have
Step1's command via main function argument.
This patch manages a command line argument dynamically and updates
argc and argv of "struct dhcpcd_ctx ctx" in case of executing
reload_config(ctx) in dhcpcd_handleargs() function.
However, one more issue happens that auto IP area such as
169.254.XX.YY cannot be set by NETLINK message from Linux Kernel
to delete 169.254.0.0 route. As a result, IP address becomes
0 instead of 169.254.XX.YY.
Although, my patch can work as our expectation except for
the above more issue, I am wondering this modification is not
good way, because each interface structure has its own options
in it. But if I chose this way, I would need to change a lot of
function argument and to take care of all procedure (function
call path) that is beyond my understanding so far.
Please note that dhcpcd-6.9.2 doesn't have this issue. That version
is different procedure and data management from dhcpcd-6.11.2.
Thank you for your efforts.
Best Regards,
Koichi Okamoto
Attachment:
dhcpcdignorecommand.patch
Description: dhcpcdignorecommand.patch
Archive administrator: postmaster@marples.name