Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show generated MAC address for farp/dhcp plugin #239

Closed
harridu opened this issue Mar 9, 2021 · 3 comments
Closed

show generated MAC address for farp/dhcp plugin #239

harridu opened this issue Mar 9, 2021 · 3 comments
Milestone

Comments

@harridu
Copy link

harridu commented Mar 9, 2021

It would be very nice if the charon.log file could show the generated MAC address in the "sending DHCP DISCOVER to 255.255.255.255" lines. This could help to resolve problems, if there is a static mapping between MAC address and IP address configured on the DHCP server. It also helps to find duplicate MAC addresses, e.g. due to a reused key file (just by accident, of course).

@tobiasbrunner
Copy link
Member

Sure, we can add that. I've pushed a commit to the 239-dhcp-mac-log branch.

Note that the MAC address is not the only identifier a DHCP server can use to assign leases. If the client identity is a FQDN it is always sent in a Hostname extension and if identity_lease is enabled the identity (in its binary encoding, no matter the type) is sent in a Client Id extension.

@tobiasbrunner tobiasbrunner added feedback and removed new labels May 7, 2021
@harridu
Copy link
Author

harridu commented May 25, 2021

I have added the patch to 5.9.2. The logfile looks like this:

May 25 21:53:16 23[IKE1] <IPSec-IKEv2|1> peer requested virtual IP 172.19.122.57
May 25 21:53:16 23[CFG1] <IPSec-IKEv2|1> sending DHCP DISCOVER for 7a:a7:3e:a3:16:c5 to 172.19.122.9
May 25 21:53:17 23[CFG1] <IPSec-IKEv2|1> sending DHCP DISCOVER for 7a:a7:3e:a3:16:c5 to 172.19.122.9
May 25 21:53:19 23[CFG1] <IPSec-IKEv2|1> sending DHCP DISCOVER for 7a:a7:3e:a3:16:c5 to 172.19.122.9
May 25 21:53:19 24[CFG1] received DHCP OFFER 172.19.122.57 from 172.19.122.9
May 25 21:53:19 23[CFG1] <IPSec-IKEv2|1> sending DHCP REQUEST for 172.19.122.57 to 172.19.122.9
May 25 21:53:19 23[CFG1] <IPSec-IKEv2|1> sending DHCP REQUEST for 172.19.122.57 to 172.19.122.9
May 25 21:53:19 23[CFG1] <IPSec-IKEv2|1> sending DHCP REQUEST for 172.19.122.57 to 172.19.122.9
May 25 21:53:19 27[CFG1] received DHCP ACK for 172.19.122.57

Great.

@tobiasbrunner
Copy link
Member

Thanks for testing, applied to master.

@tobiasbrunner tobiasbrunner added this to the 5.9.3 milestone Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants