Re: Configuration profiles handling by libdhcpcd
Roy Marples
Fri May 31 21:50:18 2019
On 31/05/2019 19:47, Langlois, Maxime wrote:
Hi!
I've tested the patch and it worked: the profile block stays untouched.
Great!
Comitted here:
https://roy.marples.name/cgit/dhcpcd-ui.git/commit/?id=d1890f0a7f4e374d51b24187dd69cf9a589119d7
Now I am also searching how, if possible, I can access complete
interface status information after the interface has been configured
through DHCP. I see in your examples that the status callback uses the
dhcpcd_if_message function to display a message containing ip address
and mask, but what about the gateway ip? Is there a way to access more
complete interface information after DHCP configuration has completed?Thanks,
Maxime
All dhcpcd options are available :)
dhcpcd -V | grep routers
003 routers array ipaddress request
All current DHCP options are prefixed new_
const char *routers = dhcpcd_get_value(ifp, "new_routers");
Good luck!
Roy
On Fri, 2019-05-31 at 16:43 +0100, Roy Marples wrote:
Hi
Can you try this patch please?
Let me know if it works!
Roy
diff --git a/src/libdhcpcd/config.c b/src/libdhcpcd/config.c
index 53949f4..ba4bc07 100644
--- a/src/libdhcpcd/config.c
+++ b/src/libdhcpcd/config.c
@@ -267,7 +267,9 @@ config(DHCPCD_CONNECTION *con, int action, const
char *block, const char *name,
} else {
/* Start of a block, skip if not ours */
if (strcmp(option, "interface") == 0 ||
- strcmp(option, "ssid") == 0)
+ strcmp(option, "ssid") == 0 ||
+ strcmp(option, "profile") == 0 ||
+ strcmp(option, "fallback") == 0)
{
if (block && name && line &&
strcmp(option, block) == 0 &&
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.
Archive administrator: postmaster@marples.name