Changeset 27fc03
- Timestamp:
- 06/11/09 21:52:42 (3 years ago)
- Branches:
- master
- Children:
- 3eef14
- Parents:
- 894ca2
- git-author:
- Erik Ekman <yarrick@…> (06/11/09 21:52:42)
- git-committer:
- Erik Ekman <erik@…> (02/04/12 20:34:02)
- Files:
-
- 1 added
- 2 edited
-
doc/proto_00000501.txt (added)
-
src/iodined.c (modified) (2 diffs)
-
src/version.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/iodined.c
raddd79 r27fc03 390 390 } 391 391 return; 392 } else if(in[0] == 'I' || in[0] == 'i') { 393 /* Request for IP number */ 394 in_addr_t replyaddr; 395 unsigned addr; 396 char reply[5]; 397 398 userid = b32_8to5(in[1]); 399 if (check_user_and_ip(userid, q) != 0) { 400 write_dns(dns_fd, q, "BADIP", 5); 401 return; /* illegal id */ 402 } 403 404 if (ns_ip != INADDR_ANY) { 405 /* If set, use assigned external ip (-n option) */ 406 replyaddr = ns_ip; 407 } else { 408 /* otherwise return destination ip from packet */ 409 memcpy(&replyaddr, &q->destination.s_addr, sizeof(in_addr_t)); 410 } 411 412 addr = htonl(replyaddr); 413 reply[0] = 'I'; 414 reply[1] = (addr >> 24) & 0xFF; 415 reply[2] = (addr >> 16) & 0xFF; 416 reply[3] = (addr >> 8) & 0xFF; 417 reply[4] = (addr >> 0) & 0xFF; 418 write_dns(dns_fd, q, reply, sizeof(reply)); 392 419 } else if(in[0] == 'Z' || in[0] == 'z') { 393 420 /* Check for case conservation and chars not allowed according to RFC */ … … 601 628 602 629 if (ns_ip != INADDR_ANY) { 630 /* If ns_ip set, overwrite destination addr with it. 631 * Destination addr will be sent as additional record (A, IN) */ 603 632 memcpy(&q->destination.s_addr, &ns_ip, sizeof(in_addr_t)); 604 633 } -
src/version.h
r8463d2 r27fc03 20 20 /* This is the version of the network protocol 21 21 It is usually equal to the latest iodine version number */ 22 #define VERSION 0x0000050 022 #define VERSION 0x00000501 23 23 24 24 #endif /* _VERSION_H_ */
Note: See TracChangeset
for help on using the changeset viewer.
