char line[OPTION_PARM_SIZE];
while (buf_parse(buf, ',', line, sizeof(line)))
{
- /* peer-id and auth-token might change on restart and this should not trigger reopening tun
+ /* peer-id and auth-token might change on restart and this should not
+ * trigger reopening tun
+ * Also other options that only affect the control channel should
+ * not trigger a reopen of the tun device
*/
- if (strprefix(line, "peer-id ") || strprefix(line, "auth-token ")
- || strprefix(line, "auth-token-user "))
+ if (strprefix(line, "peer-id ")
+ || strprefix(line, "auth-token ")
+ || strprefix(line, "auth-token-user")
+ || strprefix(line, "protocol-flags ")
+ || strprefix(line, "key-derivation ")
+ || strprefix(line, "explicit-exit-notify ")
+ || strprefix(line, "ping ")
+ || strprefix(line, "ping-restart ")
+ || strprefix(line, "ping-timer "))
{
continue;
}
/* tun reopen only needed if cipher change can change tun MTU */
- if (strprefix(line, "cipher ") && !opt->ce.tun_mtu_defined)
+ if (strprefix(line, "cipher ") && opt->ce.tun_mtu_defined)
{
continue;
}