ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf.c (file contents):
Revision 8864 by michael, Sat Feb 16 09:54:03 2019 UTC vs.
Revision 8872 by michael, Sat Feb 16 21:49:34 2019 UTC

# Line 98 | Line 98 | conf_dns_callback(void *vptr, const stru
98    conf->dns_pending = false;
99  
100    if (addr)
101 <    memcpy(&conf->addr, addr, sizeof(conf->addr));
101 >    memcpy(conf->addr, addr, sizeof(*conf->addr));
102    else
103      conf->dns_failed = true;
104   }
# Line 187 | Line 187 | conf_free(struct MaskItem *conf)
187    xfree(conf->whois);
188    xfree(conf->user);
189    xfree(conf->host);
190 +  xfree(conf->addr);
191 +  xfree(conf->bind);
192    xfree(conf->cipher_list);
193  
194    DLINK_FOREACH_SAFE(node, node_next, conf->hub_list.head)
# Line 517 | Line 519 | operator_find(const struct Client *who,
519              break;
520            case HM_IPV4:
521              if (who->ip.ss.ss_family == AF_INET)
522 <              if (match_ipv4(&who->ip, &conf->addr, conf->bits))
522 >              if (match_ipv4(&who->ip, conf->addr, conf->bits))
523                  if (!conf->class->max_total || conf->class->ref_count < conf->class->max_total)
524                    return conf;
525              break;
526            case HM_IPV6:
527              if (who->ip.ss.ss_family == AF_INET6)
528 <              if (match_ipv6(&who->ip, &conf->addr, conf->bits))
528 >              if (match_ipv6(&who->ip, conf->addr, conf->bits))
529                  if (!conf->class->max_total || conf->class->ref_count < conf->class->max_total)
530                    return conf;
531              break;
# Line 730 | Line 732 | lookup_confhost(struct MaskItem *conf)
732  
733    assert(res);
734  
735 <  memcpy(&conf->addr, res->ai_addr, res->ai_addrlen);
736 <  conf->addr.ss_len = res->ai_addrlen;
737 <  conf->addr.ss.ss_family = res->ai_family;
735 >  memcpy(conf->addr, res->ai_addr, res->ai_addrlen);
736 >  conf->addr->ss_len = res->ai_addrlen;
737 >  conf->addr->ss.ss_family = res->ai_family;
738  
739    freeaddrinfo(res);
740   }

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)