summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-09 10:09:33 +0200
committerGitHub <noreply@github.com>2024-06-09 10:09:33 +0200
commitc4a3a55516cf03794f8baa45ebf9fb3014503106 (patch)
treed0930a924124beee0be270582bd05c5433424b9f
parent07efcfc28cc2ba1420a470f9bb9cf3be68d8ff47 (diff)
parent253bf34371173e3cdd4871c18148ed75c3fa0832 (diff)
downloadvyos-1x-c4a3a55516cf03794f8baa45ebf9fb3014503106.tar.gz
vyos-1x-c4a3a55516cf03794f8baa45ebf9fb3014503106.zip
Merge pull request #3600 from nvollmar/T6460
T6460: fix DHCPv6 duid formatting
-rwxr-xr-xsrc/op_mode/dhcp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py
index 54d492cda..3229da4ad 100755
--- a/src/op_mode/dhcp.py
+++ b/src/op_mode/dhcp.py
@@ -47,7 +47,8 @@ def _utc_to_local(utc_dt):
return datetime.fromtimestamp((datetime.fromtimestamp(utc_dt) - datetime(1970, 1, 1)).total_seconds())
-def _format_hex_string(in_str):
+def _format_hex_string(in_bytes):
+ in_str = bytes(in_bytes).hex()
out_str = ""
# if input is divisible by 2, add : every 2 chars
if len(in_str) > 0 and len(in_str) % 2 == 0: