Merge "Fix padding logic for UDP health daemon" into stable/train

This commit is contained in:
Zuul 2020-05-06 13:56:31 +00:00 committed by Gerrit Code Review
commit dcd80d3028
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ def get_listener_realserver_mapping(ns_name, listener_ip_port,
ip_obj = ipaddress.ip_address(six.text_type(listener_ip.strip('[]')))
output = read_kernel_file(ns_name, KERNEL_LVS_PATH).split('\n')
if ip_obj.version == 4:
ip_to_hex_format = "0%X" % ip_obj._ip
ip_to_hex_format = "%.8X" % ip_obj._ip
else:
ip_to_hex_format = r'\[' + ip_obj.exploded + r'\]'
port_hex_format = "%.4X" % int(listener_port)