Hi Rowland,
I don't want to be impertinent, but what's about the second part of my
answer?
I don't think there's an IPv6 address in play. It's just the command
that searches for the reverse zones which is giving back also the IPv6 zone.
If then your function "rev_zone_info" gets first the IPv6 reverse zone
it breaks the function because the name is totally other constructed.
Or am I misunderstand something?
Regards
Ingo
https://github.com/WAdama
Rowland Penny via samba schrieb am 12.11.2021 um 14:38:> On Fri, 2021-11-12 at 13:55 +0100, Ingo Asche wrote:
>> The script gets exactly what you described in your first answer. An
>> IPv6
>> address is not shown in the syslog.
> So the script just sends an IPv4 address, this means that the IPv6
> address must be coming from this line:
>
> PTR_REC=$($SAMBATOOL dns query ${Server} ${revzone} ${IP2add} PTR
> $KTYPE 2>/dev/null | grep 'PTR:' | awk '{print $2}' |
awk -F '.'
> '{print $1}')
>
> The samba-tool dns query must be returning an IPv4 AND an IPV6 address,
> I think I need to use an array and use that to discard any IPv6
> addresses.
>
> Now I know what the problem is, I can work on fixing it.
>
> Rowland
>
>
>