diff options
| author | Christian Hopps <chopps@labn.net> | 2023-07-14 18:21:55 -0400 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-07-14 18:24:44 -0400 | 
| commit | 07035ce9548021c2d9484358aa620572d7dad851 (patch) | |
| tree | a9d468b9ab4e007cd34330f31ac9d5232976d6b3 /lib/vty.h | |
| parent | 76835fd55868b485b17c3f9091721335bd466cd8 (diff) | |
vtysh: track and fix file-lock use in the workaround from 2004
There's a workaround in the code from a bug from back in 2004, it ends
and re-enters config mode anytime an `exit` is done from a level below
the top-level config node (e.g., from a `router isis` node). We need to
re-enter config mode with or without a lock according to how we actually
entered it to begin with.
fixes #13920
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/vty.h')
| -rw-r--r-- | lib/vty.h | 4 | 
1 files changed, 4 insertions, 0 deletions
@@ -231,6 +231,10 @@ struct vty {  	const char *mgmt_req_pending_cmd;  	bool mgmt_locked_candidate_ds;  	bool mgmt_locked_running_ds; +	/* Need to track when we file-lock in vtysh to re-lock on end/conf t +	 * workaround +	 */ +	bool vtysh_file_locked;  };  static inline void vty_push_context(struct vty *vty, int node, uint64_t id)  | 
