Рысь
2015-Oct-18 15:11 UTC
Bug? Tinc does not reread it's host file into config_tree on SIGHUP
Just started building the new network with automatic updates and noticed a very weird thing: when master tincd was reloaded (which sends updates), it stopped sending updates. Debugging session revealed that lookup_config(config_tree, NAME) returned NULL when NAME was any configuration item from our host file _after_ SIGHUP. Before it, it returned valid value. I see config_tree is appended with variables from node's own host file only once, in setup_myself(). After config reload, config_tree is deleted and created again, but no reading of host file variables occur since then. It not only failed with my own newly introduced variables, but with every host file specific variable, for example, "Compression". I then fixed it with attached patch. It reads host file again on SIGHUP or internal reload (and maybe in other cases). If it was fixed later, then blame me using older version, but I see this also on completely unpatched 1.0.16. Or this was intentional? What I had broken then? -- http://lynxlynx.tk/ Power electronics made simple Unix and simple KISS C code ----------- ???????? ????? ----------- A non-text attachment was scrubbed... Name: tinc-1.0.16_reread_own_hostfile.patch Type: application/octet-stream Size: 562 bytes Desc: ??????????? URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20151018/b717d4b3/attachment.obj>
Guus Sliepen
2015-Oct-18 20:09 UTC
Bug? Tinc does not reread it's host file into config_tree on SIGHUP
On Sun, Oct 18, 2015 at 10:11:55PM +0700, ???? wrote:> Just started building the new network with automatic updates and > noticed a very weird thing: when master tincd was reloaded (which sends > updates), it stopped sending updates. > > Debugging session revealed that lookup_config(config_tree, NAME) > returned NULL when NAME was any configuration item from our host file > _after_ SIGHUP. Before it, it returned valid value. I see config_tree > is appended with variables from node's own host file only once, in > setup_myself(). After config reload, config_tree is deleted and created > again, but no reading of host file variables occur since then. > > It not only failed with my own newly introduced variables, but with > every host file specific variable, for example, "Compression".Ah, that's indeed a bug in tinc 1.0.x.> I then fixed it with attached patch. It reads host file again on > SIGHUP or internal reload (and maybe in other cases).Ok, that looks like it might work.> If it was fixed later, then blame me using older version, but I see > this also on completely unpatched 1.0.16.It is fixed in the 1.1 branch, but as far as I can see the bug is still in 1.0.26. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20151018/dad57404/attachment.sig>
Maybe Matching Threads
- [PATCH 1/4] Experimental IFF_ONE_QUEUE support for Linux
- [PATCH] New '-o' option to configure server or hosts from command line
- [PATCH] src/linux/device.c: Fix segfault when running without `--net'.
- [PATCH] Use /dev/tap0 by default on BSD if mode != router
- friend of a friend type darknets