From 48bfbb8ecf30edf634f1998d4b7dcc1a92e28f53 Mon Sep 17 00:00:00 2001 From: hagbard Date: Thu, 22 Nov 2018 10:57:30 -0800 Subject: T989: IPoE implementation - adding vyos-accel-ppp-ipoe-kmod to dependencies --- debian/control | 1 + 1 file changed, 1 insertion(+) (limited to 'debian/control') diff --git a/debian/control b/debian/control index 03feeddc8..34e95a547 100644 --- a/debian/control +++ b/debian/control @@ -48,6 +48,7 @@ Depends: python3, tftpd-hpa, igmpproxy, vyos-accel-ppp, + vyos-accel-ppp-ipoe-kmod, mdns-repeater, udp-broadcast-relay, pdns-recursor, -- cgit v1.2.3 From 44c8175dc975c8a3b73bf14c71dd890d52f00e67 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 3 Dec 2018 01:35:23 +0100 Subject: T956: display SA traffic counters in human-redable units. --- debian/control | 1 + src/op_mode/show_ipsec_sa.py | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'debian/control') diff --git a/debian/control b/debian/control index 34e95a547..7061d50ef 100644 --- a/debian/control +++ b/debian/control @@ -25,6 +25,7 @@ Depends: python3, python3-tabulate, python3-six, python3-isc-dhcp-leases, + python3-hurry.filesize, ipaddrcheck, tcpdump, tshark, diff --git a/src/op_mode/show_ipsec_sa.py b/src/op_mode/show_ipsec_sa.py index b03014b2f..3c8d678eb 100755 --- a/src/op_mode/show_ipsec_sa.py +++ b/src/op_mode/show_ipsec_sa.py @@ -4,6 +4,7 @@ import re import subprocess import tabulate +import hurry.filesize def parse_conn_spec(s): # Example: ESTABLISHED 14 seconds ago, 10.0.0.2[foo]...10.0.0.1[10.0.0.1] @@ -39,6 +40,11 @@ for conn in connections: if ip == id: id = None enc, hash, dh, bytes_in, bytes_out = parse_ike_line(status) + + # Convert bytes to human-readable units + bytes_in = hurry.filesize.size(bytes_in) + bytes_out = hurry.filesize.size(bytes_out) + status_line = [conn, "up", time, "{0}/{1}".format(bytes_in, bytes_out), ip, id, "{0}/{1}/{2}".format(enc, hash, dh)] except Exception as e: print(status) -- cgit v1.2.3