Bug? Tinc does not reread it's host file into config_tree on SIGHUP

Рысь lynx at lynxlynx.tk
Sun Oct 18 17:11:55 CEST 2015


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>


More information about the tinc mailing list