"persistent-keepalive = off" handling

This commit is contained in:
Pavel Muhortov 2023-08-16 14:50:32 +03:00
parent 76f1c8d6df
commit acfbeeee5d

View File

@ -133,6 +133,10 @@ def wg_dmp() -> list:
if len(line_list) == 5:
pass
if len(line_list) == 9:
try:
i_ka = int(line_list[8])
except ValueError:
i_ka = 0
peer_list.append(
{
"name": line_list[1],
@ -141,7 +145,7 @@ def wg_dmp() -> list:
"b_rx": int(line_list[6]),
"b_tx": int(line_list[7]),
"p_lh": int(line_list[5]),
"i_ka": int(line_list[8]),
"i_ka": i_ka,
"w_if": w_if
}
)