From a4efc152ab5e9a3c44ba73e9846027eb8c8d7d09 Mon Sep 17 00:00:00 2001 From: Greg Bowering Date: Thu, 17 May 2012 13:25:03 +0930 Subject: [PATCH] Package 'sys' renamed to 'util'. SERVER_HOST changed to '0.0.0.0' as '127.0.0.1' was only accepting inbound TFTP connections via the loopback interface. Using '0.0.0.0' as the host binds to any/all network interfaces. SERVER_PORT changed to well known TFTP port number 69. Run node as Administrator (Windows) or root (*nix) to be allowed to bind to this port. --- udp/tftp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/udp/tftp.js b/udp/tftp.js index f55f8f5..cf601f7 100644 --- a/udp/tftp.js +++ b/udp/tftp.js @@ -4,11 +4,11 @@ */ var dgram = require('dgram'); -var slog = require('sys').log; +var slog = require('util').log; var fs = require('fs'); -var SERVER_HOST='127.0.0.1'; -var SERVER_PORT=1069; +var SERVER_HOST='0.0.0.0'; +var SERVER_PORT=69; var opcodes = {OPCODE_RRQ: 1,