Kim Rinnewitz reported that --local-port didn't work with TFTP transfers.
This happened because the tftp code always uncondionally did a bind() without caring if one already had been done and then it failed. I wrote a test case (1009) to verify this, but it is a bit error-prone since it will have to pick a fixed local port number and since the tests are run on so many different hosts in different situations I add it in disabled state.
This commit is contained in:
43
tests/data/test1009
Normal file
43
tests/data/test1009
Normal file
@@ -0,0 +1,43 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
TFTP
|
||||
TFTP RRQ
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
a chunk of
|
||||
data
|
||||
returned
|
||||
to client
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
tftp
|
||||
</server>
|
||||
<name>
|
||||
TFTP retrieve
|
||||
</name>
|
||||
<command>
|
||||
tftp://%HOSTIP:%TFTPPORT//1009 --local-port 44444
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify pseudo protocol after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
opcode: 1
|
||||
filename: /1009
|
||||
mode: octet
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Reference in New Issue
Block a user