diff options
| author | Sam Varshavchik | 2021-11-11 19:31:10 -0500 | 
|---|---|---|
| committer | Sam Varshavchik | 2021-11-11 19:31:10 -0500 | 
| commit | 424cf6965d8144f5ecd0aecd9f45362bbb22a167 (patch) | |
| tree | 92f677621d4048b41bbc7557f90d0de336b26bfc | |
| parent | 9183636bf975dc6a91f264a966d76dc53942c53f (diff) | |
| download | courier-libs-424cf6965d8144f5ecd0aecd9f45362bbb22a167.tar.bz2 | |
rfc1035mxlist: add an distinct return code for "MX ." reply.
| -rw-r--r-- | rfc1035/rfc1035mxlist.c | 6 | ||||
| -rw-r--r-- | rfc1035/rfc1035mxlist.h | 1 | 
2 files changed, 7 insertions, 0 deletions
| diff --git a/rfc1035/rfc1035mxlist.c b/rfc1035/rfc1035mxlist.c index 48c5f3c..cd08a11 100644 --- a/rfc1035/rfc1035mxlist.c +++ b/rfc1035/rfc1035mxlist.c @@ -382,6 +382,12 @@ int seen_good=0;  			replyp->allrrs[index]->rr.mx.mx_label, mxname) == 0)  			continue; +		if (*mxname == 0) /* MX . */ +		{ +			rfc1035_replyfree(replyp); +			return (RFC1035_MX_NONE); +		} +  		switch (add_arecords(res, list, replyp,  				     replyp->allrrs[index]->rr.mx.preference,  				     mxname, diff --git a/rfc1035/rfc1035mxlist.h b/rfc1035/rfc1035mxlist.h index a4417b6..7846cfb 100644 --- a/rfc1035/rfc1035mxlist.h +++ b/rfc1035/rfc1035mxlist.h @@ -24,6 +24,7 @@ extern "C" {  #define	RFC1035_MX_HARDERR	2	/* Hard DNS error */  #define	RFC1035_MX_INTERNAL	3	/* Internal library error */  #define	RFC1035_MX_BADDNS	4	/* Bad DNS records */ +#define RFC1035_MX_NONE		5	/* "MX ." record */  struct rfc1035_mxlist {  	struct rfc1035_mxlist *next; | 
