Download | Plain Text | No Line Numbers


  1. --- dnscache.c 2011-06-03 00:54:35.000000000 +0200
  2. +++ dnscache.c 2011-06-03 00:53:33.000000000 +0200
  3. @@ -445,6 +445,10 @@
  4. if (!ip6_scan(x,myipincoming))
  5. strerr_die3x(111,FATAL,"unable to parse IP address ",x);
  6.  
  7. + unsigned long port = 53;
  8. + x = env_get("PORT");
  9. + if (x) scan_ulong(x,&port);
  10. +
  11. #if 0
  12. /* if if IP is a mapped-IPv4 address, disable IPv6 functionality */
  13. /* this is actually a bad idea */
  14. @@ -455,13 +459,13 @@
  15. udp53 = socket_udp6();
  16. if (udp53 == -1)
  17. strerr_die2sys(111,FATAL,"unable to create UDP socket: ");
  18. - if (socket_bind6_reuse(udp53,myipincoming,53,interface) == -1)
  19. + if (socket_bind6_reuse(udp53,myipincoming,port,interface) == -1)
  20. strerr_die2sys(111,FATAL,"unable to bind UDP socket: ");
  21.  
  22. tcp53 = socket_tcp6();
  23. if (tcp53 == -1)
  24. strerr_die2sys(111,FATAL,"unable to create TCP socket: ");
  25. - if (socket_bind6_reuse(tcp53,myipincoming,53,interface) == -1)
  26. + if (socket_bind6_reuse(tcp53,myipincoming,port,interface) == -1)
  27. strerr_die2sys(111,FATAL,"unable to bind TCP socket: ");
  28.  
  29. droproot(FATAL);
  30.