diff options
author | jack9603301 <jack9603301@163.com> | 2021-03-17 02:20:59 +0800 |
---|---|---|
committer | jack9603301 <jack9603301@163.com> | 2021-03-17 02:58:15 +0800 |
commit | 5995f83eded2169cb710070c89f067ac6e28f6af (patch) | |
tree | 5093c869d31a3244d348810b129771bec823fc2f /src/op_mode/show_nat_rules.py | |
parent | 2ee759f3cbd698ac53fcb0a87c095eb3ef9bbe85 (diff) | |
download | vyos-1x-5995f83eded2169cb710070c89f067ac6e28f6af.tar.gz vyos-1x-5995f83eded2169cb710070c89f067ac6e28f6af.zip |
nat66: T2518: Modify NAT ruleid acquisition method
Diffstat (limited to 'src/op_mode/show_nat_rules.py')
-rwxr-xr-x | src/op_mode/show_nat_rules.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/op_mode/show_nat_rules.py b/src/op_mode/show_nat_rules.py index 511c33610..a98fbef8c 100755 --- a/src/op_mode/show_nat_rules.py +++ b/src/op_mode/show_nat_rules.py @@ -41,9 +41,7 @@ if args.source or args.destination: for idx in range(0, len(data_json)): data = data_json[idx] comment = data['comment'] - rule = comment.replace('SRC-NAT-','') - rule = rule.replace('DST-NAT-','') - rule = rule.replace(' tcp_udp','') + rule = int(''.join(list(filter(str.isdigit, comment)))) chain = data['chain'] if not (args.source and chain == 'POSTROUTING') or (not args.source and chain == 'PREROUTING'): continue |