-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Double conf_init in case of config reload: is it needed? #62
Comments
I am asking because I am looking into how to change the generation of A records to make it more flexible and fix issued when introducing IPv6 addresses. I am partially answering my question, because I forgot that |
It's a while ago I did that code, so not really sure why. The end-goal, however, is to be able to handle both first startup and SIGHUP in the same manner. Most of my coaxing the daemon part (and mquery) has been to force it (them) to just do what I wanted without as few changes to libmdnsd as possible. So if you have ideas for improvements/rewrites/simplifications that still meet the that use-case go ahead and do it! Don't be afraid to do radical changes :) |
Yeah, that's where the testing part comes in. :) I like to create some security by having test that test current behaviour before making major changes to parts I have no intimate familiarity with or limited understanding of. It is a bit tricky with the deamon, though. |
Sounds reasonable. I think at least parts of the daemon functionality is easier to verify with the component level testing I added initially. So I can help with that if you like? |
Well, I thin we need to rework how A records are created, as it breaks when adding IPv6. So essentially I wanted to test that a valid A (and later AAAA) record is still created, after refactoring the code for that. |
Yes, the only test right now is |
mdnsd/src/mdnsd.c
Lines 432 to 440 in 4570d3e
Why does this reload case do a
sys_init
(which runsconf_init
on each interface), and then removes all records and calls aconf_init
again on every interface? I am a bit confused as to why this is necessary.Unfortunately neither the commit nor the PR introducing the
records_clear
has any information as to why removing all records is necessary. But if it is, then does this really need to happen in two loops over the interfaces? Wouldn't therecords_clear
rather have to be insys_init
orconf_init
? It is initialization, after all (according to the name).The text was updated successfully, but these errors were encountered: