diff options
-rw-r--r-- | op-mode-definitions/include/show-nht.xml.i | 20 | ||||
-rw-r--r-- | op-mode-definitions/show-ip.xml.in | 7 | ||||
-rw-r--r-- | op-mode-definitions/show-ipv6.xml.in | 1 | ||||
-rw-r--r-- | python/vyos/system/image.py | 6 | ||||
-rwxr-xr-x | src/op_mode/vpn_ike_sa.py | 4 |
5 files changed, 27 insertions, 11 deletions
diff --git a/op-mode-definitions/include/show-nht.xml.i b/op-mode-definitions/include/show-nht.xml.i new file mode 100644 index 000000000..55dacf3a4 --- /dev/null +++ b/op-mode-definitions/include/show-nht.xml.i @@ -0,0 +1,20 @@ +<!-- included start from show-nht.xml.i --> +<node name="nht"> + <properties> + <help>Show Nexthop tracking table</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + <children> + <tagNode name="vrf"> + <properties> + <help>Specify the VRF</help> + <completionHelp> + <path>vrf name</path> + <list>all default</list> + </completionHelp> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + </tagNode> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/show-ip.xml.in b/op-mode-definitions/show-ip.xml.in index 3caf1f1ea..bac4df05c 100644 --- a/op-mode-definitions/show-ip.xml.in +++ b/op-mode-definitions/show-ip.xml.in @@ -33,12 +33,7 @@ </tagNode> </children> </node> - <leafNode name="nht"> - <properties> - <help>Show IPv4 nexthop tracking table</help> - </properties> - <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> - </leafNode> + #include <include/show-nht.xml.i> </children> </node> </children> diff --git a/op-mode-definitions/show-ipv6.xml.in b/op-mode-definitions/show-ipv6.xml.in index 66bc2485a..e10379ac2 100644 --- a/op-mode-definitions/show-ipv6.xml.in +++ b/op-mode-definitions/show-ipv6.xml.in @@ -28,6 +28,7 @@ </properties> <command>vtysh -c "show ipv6 forwarding"</command> </node> + #include <include/show-nht.xml.i> <node name="ripng"> <properties> <help>Show RIPNG protocol information</help> diff --git a/python/vyos/system/image.py b/python/vyos/system/image.py index 5460e6a36..ba9a6dfa7 100644 --- a/python/vyos/system/image.py +++ b/python/vyos/system/image.py @@ -259,9 +259,9 @@ def is_live_boot() -> bool: running_image_result = regex_filter.match(cmdline) if running_image_result: boot_type: str = running_image_result.groupdict().get('boot_type', '') - if boot_type == 'live': - return True - return False + if boot_type == 'boot': + return False + return True def if_not_live_boot(func): """Decorator to call function only if not live boot""" diff --git a/src/op_mode/vpn_ike_sa.py b/src/op_mode/vpn_ike_sa.py index 069c12069..7186bdec2 100755 --- a/src/op_mode/vpn_ike_sa.py +++ b/src/op_mode/vpn_ike_sa.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021 VyOS maintainers and contributors +# Copyright (C) 2021-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -57,7 +57,7 @@ def ike_sa(peer, nat): dh_group = s(sa['dh-group']) if 'dh-group' in sa else 'n/a' natt = 'yes' if 'nat-local' in sa and s(sa['nat-local']) == 'yes' else 'no' atime = s(sa['established']) if 'established' in sa else '0' - ltime = s(sa['rekey-time']) if 'rekey_time' in sa else '0' + ltime = s(sa['rekey-time']) if 'rekey-time' in sa else '0' print(ike_sa_tunnel_prefix) print(' %-6s %-6s %-12s %-13s %-14s %-6s %-7s %-7s\n' % (state, version, encryption, integrity, dh_group, natt, atime, ltime)) |