Wrong output of IP-addresses when samba-tool dns serverinfo <some-server> is used - and IPv6 only or a mixture of IPv4 and IPv6 is around. The internal C-implementation of dns serverinfo is limited to only support IPv4 atm - which then also affects python tools like "samba-tool dns serverinfo <someserver>". I've already prepared fixes and will post them here. Cheers, Günter
Created attachment 10449 [details] found this obvious one during testing i add this obvious enum typo here - is not worth a separate bug
Created attachment 10450 [details] fix python related output
Created attachment 10451 [details] fix all the missing C-related pieces
Just for documentation purpose, i add 2 examples of wrong output. Both C and python are affected. At the bottom 2 fixed examples. In a mixed IPv6 / IPv4 environment wrong output of IPv4: samba-tool dns serverinfo li4771-131 dwVersion : 0xece0205 fBootMethod : DNS_BOOT_METHOD_DIRECTORY fAdminConfigured : FALSE fAllowUpdate : TRUE fDsAvailable : TRUE pszServerName : LI4771-131.addlz.kukkukk.com pszDsContainer : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com aipServerAddrs : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)'] aipListenAddrs : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)'] aipForwarders : [] -------------------- In the following sample the IPv6 addresses are displayed wrong: samba-tool dns serverinfo li131 dwVersion : 0xece0205 fBootMethod : DNS_BOOT_METHOD_DIRECTORY fAdminConfigured : FALSE fAllowUpdate : TRUE fDsAvailable : TRUE pszServerName : LI131.addlz.kukkukk.com pszDsContainer : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com aipServerAddrs : ['00:00:00:00:00:00:00:00 (0)', '127.0.0.1 (0)', '192.168.200.72 (0)', '00:00:fd4d:e013:bb96:a6c:00:00 (0)'] aipListenAddrs : ['00:00:00:00:00:00:00:00 (0)', '127.0.0.1 (0)', '192.168.200.72 (0)', '00:00:fd4d:e013:bb96:a6c:00:00 (0)'] aipForwarders : [] ------- The attached patches fix this: samba-tool dns serverinfo li131 --client-version=w2k dwVersion : 0xece0205 fBootMethod : DNS_BOOT_METHOD_DIRECTORY fAdminConfigured : FALSE fAllowUpdate : TRUE fDsAvailable : TRUE pszServerName : LI131.addlz.kukkukk.com pszDsContainer : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com aipServerAddrs : ['127.0.0.1', '192.168.200.72'] aipListenAddrs : ['127.0.0.1', '192.168.200.72'] ----------------------- samba-tool dns serverinfo li131 --client-version=longhorn dwVersion : 0xece0205 fBootMethod : DNS_BOOT_METHOD_DIRECTORY fAdminConfigured : FALSE fAllowUpdate : TRUE fDsAvailable : TRUE pszServerName : LI131.addlz.kukkukk.com pszDsContainer : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com aipServerAddrs : ['::1', '127.0.0.1', '192.168.200.72', 'fd4d:e013:bb96:a60c::48'] aipListenAddrs : ['::1', '127.0.0.1', '192.168.200.72', 'fd4d:e013:bb96:a60c::48'] aipForwarders : [] Cheers, Günter
Comment on attachment 10449 [details] found this obvious one during testing From 4bda589c8e68cd66ca3b0ea9496cb1b11febcae6 Mon Sep 17 00:00:00 2001 From: Guenter Kukkukk <linux@kukkukk.com> Date: Fri, 21 Nov 2014 03:40:17 +0100 Subject: [PATCH 1/3] samba-tool: Fix enum values in dns.py DNS_ZONE_UPDATE_SECURE was used twice, DNS_ZONE_UPDATE_UNSECURE was missing. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> --- python/samba/netcmd/dns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py index de0c94d..775be9e 100644 --- a/python/samba/netcmd/dns.py +++ b/python/samba/netcmd/dns.py @@ -89,7 +89,7 @@ def zone_type_string(zone_type): def zone_update_string(zone_update): - enum_defs = [ 'DNS_ZONE_UPDATE_OFF', 'DNS_ZONE_UPDATE_SECURE', + enum_defs = [ 'DNS_ZONE_UPDATE_OFF', 'DNS_ZONE_UPDATE_UNSECURE', 'DNS_ZONE_UPDATE_SECURE' ] return enum_string(dnsp, enum_defs, zone_update)
Created attachment 10461 [details] patches for samba-4.2
Created attachment 10462 [details] patches for samba-4.1
Hi Karolin, Please push the patches to 4.1/4.2. Amitay.
(In reply to Amitay Isaacs from comment #9) Pushed to autobuild-v4-[1|2]-test.
(In reply to Karolin Seeger from comment #10) Pushed to both branches. Closing out bug report. Thanks!