Branch: Tag:

2008-03-10

2008-03-10 13:41:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed bug in get_{primary_,}mx() when the looked up domain is a CNAME.

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.95

1: - // $Id: DNS.pmod,v 1.94 2008/01/31 22:45:09 grubba Exp $ + // $Id: DNS.pmod,v 1.95 2008/03/10 13:41:11 grubba Exp $   // Not yet finished -- Fredrik Hubinette      //! Domain Name System
1130:    string ret;    foreach(m->an, mapping m2)    { -  if(m2->preference<minpref) +  if(m2->mx && m2->preference<minpref)    {    ret=m2->mx;    minpref=m2->preference;
1158:    if (!m) {    return 0;    } -  array a = m->an; +  array a = filter(m->an, `[], "mx");    array(string) b = column( a, "mx");    sort( column( a, "preference"), b);