Bug 176358

Summary: /net/freebsd-tftp Incorrect TFTP Behavior with Secondary IP Address
Product: Ports & Packages Reporter: Alex Gingerich <alexg>
Component: Individual Port(s)Assignee: Walter Schwarzenfeld <w.schwarzenfeld>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: cs, w.schwarzenfeld
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description Alex Gingerich 2013-02-22 19:20:00 UTC
Initially, I noticed a quirk when using the default TFTP server. This is on a machine that has two IP addresses. They are configured as follows:

ifconfig_rl0=" inet 192.168.20.19 netmask 255.255.255.240"
ifconfig_rl0_alias0="192.168.20.18 netmask 255.255.255.240"


The first quirk I noticed, was that when a TFTP request comes in to 192.168.20.18, the tftp server sends the response out 192.168.20.19. This causes an inability to fetch from TFTP via the 192.168.20.18 address in NAT environments.

That in itself seems to be a bit of a problem... However, the behavior gets a little stranger when specifying RFC2348 blocksizes.

When I specify a blocksize of 1448, and request a file from 192.168.20.18, the TFTP server responds from 192.168.20.19, and immediatly starts sending the file in the first response packet.

However, when I specify a blocksize of 1448, but request from 192.168.20.19, the tftp server sends back an OACK in the first packet, waits for an acknowledgement from the client, and then begins sending a file.

Fix: Patch attached with submission follows:
How-To-Repeat: 1) Set up a machine with two IP addresses, in the same subnet, on the same interfaces, and TFTP configured.
2) Get a TFTP file from both the primary and alias IP, both with and without the blocksize option.
3) Compare the resulting packet captures.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-02-22 19:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->edwin

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Carlo Strub freebsd_committer freebsd_triage 2014-09-11 20:10:32 UTC
Is this PR still relevant?
Comment 3 Walter Schwarzenfeld 2018-01-12 00:32:11 UTC
Maintainer is now ports@FreeBSD.org.
Is this still a problem and/or relevant.
Or could it closed?
Comment 4 Walter Schwarzenfeld 2018-03-16 21:59:28 UTC
/usr/ports/MOVED:
net/freebsd-tftp||2018-03-16|Imported into base in FreeBSD 8.0