summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Surett <surettcharles@gmail.com>2021-11-24 18:07:56 -0500
committerChristian Poessinger <christian@poessinger.com>2022-07-05 09:43:02 +0200
commiteaaaa797fa9dac621b964f1bd02fab3b9eebe55e (patch)
treeaf23a873e27d0e96f1ef93e1abae3de9def62d61
parentae41b2bacfe1ed30ea8311278e4560d8cfb244ae (diff)
downloadvyos-1x-eaaaa797fa9dac621b964f1bd02fab3b9eebe55e.tar.gz
vyos-1x-eaaaa797fa9dac621b964f1bd02fab3b9eebe55e.zip
hosts: T3979: Change address to a list
This fixes `hostfile-update` in the dhcp-server (cherry picked from commit 39d6ca61c50f70171b2f7bcccbba2c70d102cb7f)
-rwxr-xr-xsrc/utils/vyos-hostsd-client3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/vyos-hostsd-client b/src/utils/vyos-hostsd-client
index d4d38315a..a0515951a 100755
--- a/src/utils/vyos-hostsd-client
+++ b/src/utils/vyos-hostsd-client
@@ -129,7 +129,8 @@ try:
params = h.split(",")
if len(params) < 2:
raise ValueError("Malformed host entry")
- entry['address'] = params[1]
+ # Address needs to be a list because of changes made in T2683
+ entry['address'] = [params[1]]
entry['aliases'] = params[2:]
data[params[0]] = entry
client.add_hosts({args.tag: data})