Changeset 1207
- Timestamp:
- 03/04/10 13:21:52 (2 years ago)
- Files:
-
- 1 modified
-
trunk/unxsBind/tresourcefunc.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/unxsBind/tresourcefunc.h
r1206 r1207 219 219 tResource("Can not add AAAA records to arpa zones"); 220 220 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 221 227 //if cParam1 has no consecutive colons we can simply: 222 228 if((cp=strstr(cParam1,"::"))) … … 254 260 { 255 261 guMode=uMode; 256 tResource("<blink>IPv6 sscanf case2 error!</blink>");262 tResource("<blink>IPv6 format-2 error!</blink>"); 257 263 } 258 264 break; … … 266 272 { 267 273 guMode=uMode; 268 tResource("<blink>IPv6 sscanf case3 error!</blink>");274 tResource("<blink>IPv6 format-3 error!</blink>"); 269 275 } 270 276 } … … 282 288 { 283 289 guMode=uMode; 284 tResource("<blink>IPv6 sscanf case4 error!</blink>");290 tResource("<blink>IPv6 format-4 error!</blink>"); 285 291 } 286 292 } … … 302 308 { 303 309 guMode=uMode; 304 tResource("<blink>IPv6 sscanf case5 error!</blink>");310 tResource("<blink>IPv6 format-5 error!</blink>"); 305 311 } 306 312 } … … 327 333 { 328 334 guMode=uMode; 329 tResource("<blink>IPv6 sscanf case6 error!</blink>");335 tResource("<blink>IPv6 format-6 error!</blink>"); 330 336 } 331 337 } … … 337 343 case 7: 338 344 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) 340 346 { 341 347 guMode=uMode; 342 tResource("<blink>IPv6 sscanf case 7 error!</blink>"); 343 } 348 tResource("<blink>IPv6 format-7 error!</blink>"); 349 } 350 break; 344 351 345 352 default: … … 419 426 } 420 427 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 } 421 439 } 422 440 else if(!strcmp(cRRType,"MX"))
