agdsn / hades

AG DSN Authentication and Authorization Infrastructure
MIT License
8 stars 3 forks source link

Allow same MAC addresses in different networks #92

Open sebschrader opened 4 years ago

sebschrader commented 4 years ago

Currently duplicate MAC addresses for dhcphost are rejected:

https://github.com/agdsn/hades/blob/8fb471c485251c02856d7f81a6bc2562842af2ca/templates/schema.sql.j2#L283

It seems, that dnsmasq is fine with duplicate MAC addresses, as long as they are in different subnets:

https://github.com/dnsmasq/dnsmasq/blob/ce5732e84fc46d7f99c152f736cfb4ef5ec98a01/src/dhcp-common.c#L292

If that's the case, we should allow that, because duplicate MAC addresses can happen, if users move.

sebschrader commented 1 year ago

Fixed in 2ec2219db66ffcd2073e108c5aba5797c751ce1a

lukasjuhrich commented 3 months ago

Not quite fixed: https://github.com/agdsn/hades/blob/2ec2219db66ffcd2073e108c5aba5797c751ce1a/templates/schema.sql.j2#L792-L796

This index still prevents multiple MAC addresses.