BeryJu / gravity

Fully-replicated DNS and DHCP Server with ad-blocking powered by etcd
https://gravity.beryju.io
GNU General Public License v3.0
458 stars 9 forks source link

default dhcp - If checked, this scope will be used for clients when their network can't be determined. #1077

Open Simon-CR opened 1 week ago

Simon-CR commented 1 week ago

Hi,

so I have multiple scope configured handing out IPs without issues (all via relay).

I enabled the "If checked, this scope will be used for clients when their network can't be determined." on one of my scope. All of a sudden dhcp client that had IP addresses from their respective scope started getting IPs from the "default" enabled scope instead.. turning it off returned things to normal

BeryJu commented 1 week ago

hmm, yeah the intended functionality of this is that "as a last resort", if scope can't be detected via network/relay then the scope with this flag enabled should be used, it shouldn't affect correct matches to other scopes

Simon-CR commented 1 week ago

what are the criteria for a scope to be detected via network/relay? all my configured subnet / scope are using the same relay server that throws the request to gravity.

BeryJu commented 1 week ago

https://github.com/BeryJu/gravity/blob/main/pkg/roles/dhcp/scopes.go#L107-L128 is the logic to find a scope for a DHCP request