Re: tftp-proxy(8) with nat-to

2013-12-20 Thread David Gwynne
you need to change len to be sizeof(saddr) instead of sizeof(struct sockaddr) in unprivproc_pop. likewise, the memcpy in source_addresses needs to use res->ai_addrlen instead of sizeof(struct sockaddr). with those fixes its ok by me. On 20 Dec 2013, at 9:12 pm, Florian Obser wrote: > On Fri,

Re: tftp-proxy(8) with nat-to

2013-12-20 Thread Florian Obser
On Fri, Dec 20, 2013 at 01:17:08PM +1000, David Gwynne wrote: > im glad you wrote a diff rather than simply complain that nat and tftp doesnt > work. the moving parts generally look good to me apart from the struct > src_addr and getopt chunks. > > please use sockaddr_storage instead of sockaddr

Re: tftp-proxy(8) with nat-to

2013-12-19 Thread David Gwynne
im glad you wrote a diff rather than simply complain that nat and tftp doesnt work. the moving parts generally look good to me apart from the struct src_addr and getopt chunks. please use sockaddr_storage instead of sockaddr in the src_addr struct. could you split the resolution of the argument

tftp-proxy(8) with nat-to

2013-12-19 Thread Florian Obser
tftp-proxy(8) doesn't work if there is a nat gateway in the path from the client to the server. I considered changing the location of the tftp server in our network but that's not possibly because of reasons. (6) of RFC 1925 applies... With this tftp-proxy(8) grows another knob (-a) like ftp-proxy.