]> SAFE projects GIT repository - jmp/mailleur/commitdiff
module gesspf and unidsn working together
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 16 Aug 2024 17:39:46 +0000 (13:39 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 16 Aug 2024 17:39:46 +0000 (13:39 -0400)
app/chkdns.c
lib/gesspf.c
lib/subrou.c

index 04b228df8543a7d6b29be0de1c45bed2a88adf7b..0644f18379e3f739a3445e032378c2c74391ff62 100644 (file)
@@ -13,6 +13,7 @@
 #include       "subrou.h"
 #include       "subafn.h"
 #include       "unidns.h"
+#include       "gesspf.h"
 
 /*
 \f
@@ -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);
index 6b3260979504fa7bb1e584b090bd1dda6eac0bc2..6a929cfcad457235df935dfdf2cf7e7a10f7ac81 100644 (file)
@@ -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;
index 0a44f0f86f0c3ca94a965c5777376213d4ff3baf..021702f007456c47000e33178164423d63878a7f 100644 (file)
@@ -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