-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dhcpd: move staticmap preparation to parent #4642
Move all the duplication out of Unbound/Dnsmasq code and just iterate over the results there.
- Loading branch information
Showing
3 changed files
with
80 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marjohn56 @maurice-w testers/reviewer welcome
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick look, seems fine. I'll test it later on today... Have to do real work first. :(
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fichtner, I did a quick test with unbound. The interface identifier gets prefixed correctly in host_entries.conf, but only one static mapping gets added there. Seems to be always the last one.
status_dhcpv6_leases.php only shows the interface identifier, but that might be out of scope here.
Didn't test dnsmasq.
Off topic: Hitting 'Apply changes' after static mapping changes always restarts radvd. I've probably complained about this before, but was just reminded about it by repeated connection losses. :-)
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maurice-w nice catch, e73db9c should do it, better to push more things to the ticket #4642 -- l can look at both issues for a follow-up there.
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Statics OK here.. Of course all these changes screw up my PD correction stuff that's in the pipeline but I can update that PR. Also same as @maurice-w, not tested with dnsmasq
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just came across a little issue that I haven't seen before, but it reminded me that it was something I wanted to do a while back and never got around to doing.
Scenario:
Tracked interface is showing a /60 delegation but I'm not able to ping the router LAN GUA address from the PC. Both addresses are in the same prefix.
Turns out that although the prefix requested is set to /60 on the WAN interface the actual prefix delegated is a /56. Now, this is not uncommon for ISPs to give you a prefix value different to what is asked for, and prefix delegation size selector on WAN should not be used as the prefix size on the LAN. We should be using the actual prefix size obtained from dhcp6c on the LAN configuration. We really do not need to rely on a user entered value, which is very likely to be incorrect to set the prefix size, the mods carried out to dhcp6c allow us to fully automate this. The WAN prefix delegation size should only be used as a hint value.
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marjohn56 good idea. From experience with 6RD it doesn't really matter what the upstream subnet size is as long as it's bigger. In the worst case we can widen the WAN prefix to something not even delegated and things still work fine. This is especially useful for the single /64 case we need to "delegate". If you are interested in this please create new tickets (for what you mentioned) and generally supporting a /64 as well.
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take it on, leave me to look at it. It's an issue that dhcp6c is involved in, it sets the addresses on the LAN. Now, it appears that the Linux version of dhcp6c does not have a SLA-LEN in the config, so I'll be taking a gander at that as well. I've started to look at dhcp6c, the issue is in prefixconf.c in the add_ifprefix() routine. Quick look suggests that checking the obtained prefix against the ifid_len and adjusting the ifid_len accordingly may be the way forward. I'll find some hours over the next few days to play in that pit and see if I can make it do what we want.
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have it working. dhcp6c now auto corrects where a requested prefix does not match the delegated prefix. I'll create a new issue tomorrow and we'll discuss.
d0822b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussion open in features.