@@ -1029,15 +1029,25 @@ push_update_digest(md_ctx_t *ctx, struct buffer *buf, const struct options *opt)
10291029 char line [OPTION_PARM_SIZE ];
10301030 while (buf_parse (buf , ',' , line , sizeof (line )))
10311031 {
1032- /* peer-id and auth-token might change on restart and this should not trigger reopening tun
1032+ /* peer-id and auth-token might change on restart and this should not
1033+ * trigger reopening tun
1034+ * Also other options that only affect the control channel should
1035+ * not trigger a reopen of the tun device
10331036 */
1034- if (strprefix (line , "peer-id " ) || strprefix (line , "auth-token " )
1035- || strprefix (line , "auth-token-user " ))
1037+ if (strprefix (line , "peer-id " )
1038+ || strprefix (line , "auth-token " )
1039+ || strprefix (line , "auth-token-user" )
1040+ || strprefix (line , "protocol-flags " )
1041+ || strprefix (line , "key-derivation " )
1042+ || strprefix (line , "explicit-exit-notify " )
1043+ || strprefix (line , "ping " )
1044+ || strprefix (line , "ping-restart " )
1045+ || strprefix (line , "ping-timer " ))
10361046 {
10371047 continue ;
10381048 }
10391049 /* tun reopen only needed if cipher change can change tun MTU */
1040- if (strprefix (line , "cipher " ) && ! opt -> ce .tun_mtu_defined )
1050+ if (strprefix (line , "cipher " ) && opt -> ce .tun_mtu_defined )
10411051 {
10421052 continue ;
10431053 }
0 commit comments