[Dnsmasq-discuss] Is field 'arraypos' missing in struct serv_addr4?

Xingcong Li lixingcong512 at gmail.com
Wed Jun 16 01:40:26 UTC 2021

I reviewed this commit:

commit 1c9f136b57456278ad7aae62b8bae01f01383e1c
Author: Simon Kelley <simon at thekelleys.org.uk>
Date:   Tue Jun 15 22:07:59 2021 +0100
Man page update, lease times can be given in days or weeks.

And  found the structure 'server_addr4*' was casted from to 'server*'

// domain-match.c
/* servers need the location in the array to find all the whole
set of equivalent servers from a pointer to a single one. */
for (count = 0; count < daemon->serverarraysz; count++)
  if (!(daemon->serverarray[count]->flags & SERV_LITERAL_ADDRESS))
    daemon->serverarray[count]->arrayposn = count;

But the type server_addr4 has no field 'arraypos'.

// dnsmasq.h
/* First three fields must match struct server in next three definitions..
struct serv_addr4 {
  int flags;
  char *domain;
  struct server *next;
  struct in_addr addr;

Does server_addr4 miss the field 'arraypos'?

Xingcong Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210616/60a42949/attachment.htm>

More information about the Dnsmasq-discuss mailing list