From: Jean-Marc Pigeon (Delson) Date: Fri, 16 Aug 2024 17:39:46 +0000 (-0400) Subject: module gesspf and unidsn working together X-Git-Tag: tag-0.4.2-end~19 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=806b1e936dc4c537a2785bb00055be1f8021b9c2;p=jmp%2Fmailleur module gesspf and unidsn working together --- diff --git a/app/chkdns.c b/app/chkdns.c index 04b228d..0644f18 100644 --- a/app/chkdns.c +++ b/app/chkdns.c @@ -13,6 +13,7 @@ #include "subrou.h" #include "subafn.h" #include "unidns.h" +#include "gesspf.h" /* @@ -66,17 +67,19 @@ while (proceed==true) { case 2 : //initialisation (void) afn_modesubafn(true); (void) rou_modesubrou(true); + (void) spf_modegesspf(true); break; case 3 : //doing main tash if (argc>1) { //always SPFENU spf; afnnum=afn_getipnum(argv[2]); - spf=dns_get_spf_status(&try,argv[1],afnnum); - (void) rou_alert(0,"%s %s ==> %s",argv[1],argv[2],dns_spfASCII(spf)); + spf=spf_getstatus(&try,argv[1],afnnum); + (void) rou_alert(0,"%s %s ==> %s",argv[1],argv[2],spf_spfASCII(spf)); } break; case 4 : //doing main tash + (void) spf_modegesspf(false); (void) rou_modesubrou(false); (void) afn_modesubafn(false); afnnum=afn_freeipnum(afnnum); diff --git a/lib/gesspf.c b/lib/gesspf.c index 6b32609..6a929cf 100644 --- a/lib/gesspf.c +++ b/lib/gesspf.c @@ -400,7 +400,7 @@ return spf; /* Procedure to return the SPF status string value */ /* */ /********************************************************/ -PUBLIC const char *dns_spfASCII(SPFENU spf) +PUBLIC const char *spf_spfASCII(SPFENU spf) { #define OPEP "gesspf.c:dns_spfASCII" @@ -450,7 +450,7 @@ return ascii; PUBLIC SPFENU spf_getstatus(int *try,char *domain,AFNTYP *afnnum) { -#define OPEP "gesspf.c:dns_get_spf_status" +#define OPEP "gesspf.c:spf_getstatus" SPFENU spf; char *list; @@ -482,14 +482,7 @@ while (proceed==true) { if ((list=dns_getspf(domain))==(char *)0) phase=999; //trouble trouble break; - case 3 : //check if we have only ONE SPF entry - if (rou_nbrlist((void **)list)>1) { - (void) rou_alert(0,"%s more than 1 SPF record for domain <%s>", - OPEP,domain); - phase=999; //trouble trouble - } - break; - case 4 : //gett the spf LIST related to SPF + case 3 : //gett the spf LIST related to SPF spf=is_peerip_ok(try,domain,afnnum,list); list=rou_freestr(list); break; diff --git a/lib/subrou.c b/lib/subrou.c index 0a44f0f..021702f 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -21,7 +21,7 @@ //version definition #define VERSION "0.4.2" -#define RELEASE "16" +#define RELEASE "17" //Public variables PUBLIC int debug=0; //debug level