samba-tool dns: use bytes for inet_ntop
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 23 May 2019 21:58:12 +0000 (09:58 +1200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 13 Jun 2019 08:52:31 +0000 (08:52 +0000)
commit16f3a73c1a7d02d5984083ae53da10ae91477807
tree9f5c9913feb6e87ffc0e629fea7bd8c2deb32e43
parent40ab50754d1db8fc468cad04a0bf737f45895c0f
samba-tool dns: use bytes for inet_ntop

From Python's point of view, array.AddrArray is a list of byte-valued
integers. In Python 3 we can convert directly using the likes of

         bytes(array.AddrArray[i].MaxSa[8:24])

but in 4.10 we need to support both, so we use struct.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13965

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed May 29 11:29:17 UTC 2019 on sn-devel-184
python/samba/netcmd/dns.py
selftest/knownfail.d/sambatool-dns [deleted file]