coredhcp
coredhcp copied to clipboard
plugins: each plugin instance now has its own state
Now each plugin setup has its own state
If we use coreDHCP as a library and run multiple servers, we can't separate plugin variables for each server. This PR fix this problem.
Signed-off-by: Dmitrii Aleksandrov [email protected]
Okay, i think it's ready. I fixed all the remarks, and fixed some tests.
All pluginState's is private now, and not used in tests. All pluginState methods has pointer recievers.
I also changed the plugin's server_id test, it's not entirely clear why UUID DUID's are tested if they are not supported by the plugin. I can't even call setup method with UUID DUID. Therefore, I redid all the tests for LL DUID and LLT DUID.
Thanks for the PR! That's definitely a direction we want to go into so this is very appreciated. Do you have ideas maybe for tests we could have to avoid regressions on this point ?
Sorry, i simple use this project. I also don't have any particular performance requirements. I just liked this project more than others, and I took up its revision to fit my needs.
Within 2-3 months, there will be a reality check, if the servers work well, then I will redo the logging.
@Natolumin any update? Can we merge this or no?
I have a few more plugins I'd like to upstream. Personally I think this PR goes in the right direction so I'd like to see it merged. But when it's merged I'll have to make changes to my plugins so I'd like to know one way or another.