Changeset 1207

Show
Ignore:
Timestamp:
03/04/10 13:21:52 (2 years ago)
Author:
Gary
Message:

unxsBind IPv6 PTR ip6.arpa zone support added.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/unxsBind/tresourcefunc.h

    r1206 r1207  
    219219                        tResource("Can not add AAAA records to arpa zones"); 
    220220 
     221                if(strlen(cParam1)<4) 
     222                { 
     223                        guMode=uMode; 
     224                        tResource("<blink>IPv6 number must be at least 4 chars long (e.g. 1::a)</blink>"); 
     225                } 
     226 
    221227                //if cParam1 has no consecutive colons we can simply: 
    222228                if((cp=strstr(cParam1,"::"))) 
     
    254260                                { 
    255261                                        guMode=uMode; 
    256                                         tResource("<blink>IPv6 sscanf case 2 error!</blink>"); 
     262                                        tResource("<blink>IPv6 format-2 error!</blink>"); 
    257263                                } 
    258264                        break; 
     
    266272                                        { 
    267273                                                guMode=uMode; 
    268                                                 tResource("<blink>IPv6 sscanf case 3 error!</blink>"); 
     274                                                tResource("<blink>IPv6 format-3 error!</blink>"); 
    269275                                        } 
    270276                                } 
     
    282288                                                { 
    283289                                                        guMode=uMode; 
    284                                                         tResource("<blink>IPv6 sscanf case 4 error!</blink>"); 
     290                                                        tResource("<blink>IPv6 format-4 error!</blink>"); 
    285291                                                } 
    286292                                        } 
     
    302308                                                        { 
    303309                                                                guMode=uMode; 
    304                                                                 tResource("<blink>IPv6 sscanf case 5 error!</blink>"); 
     310                                                                tResource("<blink>IPv6 format-5 error!</blink>"); 
    305311                                                        } 
    306312                                                } 
     
    327333                                                                { 
    328334                                                                        guMode=uMode; 
    329                                                                         tResource("<blink>IPv6 sscanf case 6 error!</blink>"); 
     335                                                                        tResource("<blink>IPv6 format-6 error!</blink>"); 
    330336                                                                } 
    331337                                                        } 
     
    337343                        case 7: 
    338344                                uRead=sscanf(cParam1,"%x:%x:%x:%x:%x:%x:%x:%x",&h1,&h2,&h3,&h4,&h5,&h6,&h7,&h8); 
    339                                 if(uRead!=7) 
     345                                if(uRead!=8) 
    340346                                { 
    341347                                        guMode=uMode; 
    342                                         tResource("<blink>IPv6 sscanf case 7 error!</blink>"); 
    343                                 } 
     348                                        tResource("<blink>IPv6 format-7 error!</blink>"); 
     349                                } 
     350                        break; 
    344351 
    345352                        default: 
     
    419426                } 
    420427                if(cParam1[strlen(cParam1)-1]!='.') strcat(cParam1,"."); 
     428 
     429                //Initial support for only one ip6.arpa zone per view 
     430                if(!strcmp(cZone+strlen(cZone)-8,"ip6.arpa")) 
     431                { 
     432                        if(strlen(cName)!= (32+31+10)) 
     433                        { 
     434                                guMode=uMode; 
     435                                tResource("<blink>IPv6 PTR cName format must be 32 nibbles seperated" 
     436                                                " by periods and end with '.ip6.arpa.'!</blink>"); 
     437                        } 
     438                } 
    421439        } 
    422440        else if(!strcmp(cRRType,"MX"))