#1624 closed defect (fixed)

TFTPFS not parsing hostnames & paths correctly

Reported by: Angus Gratton Owned by: Chris Johns
Priority: normal Milestone: 4.10
Component: fs Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@…, dylan.maxwell@… Blocked By:
Blocking:

Description

TFTPFS doesn't successfully parse paths correctly to hostname & file. Issue seen in 4.10 and looks the same in CVS HEAD.

I'm using PowerPC MVME3100 board, although I think this problem is non-board-specific. However, one bug will not be seen if strlen(NULL) is always zero (this is an undefined result on RTEMS PowerPC.)

To reproduce, you can use the network-demos/tftpTest application and configure it with non-BootP TFTP host and filename. No files will be successfully requested.

I've attached a patch with the fixes that I think are necessary.

I also noticed a secondary issue: if you access files as /TFTP/BOOTP_HOST/ then it looks like there may also be another problem parsing the file, because the 'cp1' variable is not set properly in tftpDriver.c. The patch includes a one-line fix for that as well, although I haven't tested that particular case myself.

Hth. Apologies for any bad formatting/deviant code style. Cheers - Angus

Attachments (2)

tftp-patch-1.diff (955 bytes) - added by Angus Gratton on 07/20/10 at 04:04:07.
Patch to fix TFTPFS on RTEMS 4.10
rtems-4.10-Bug1624.diff (1.8 KB) - added by Dylan Maxwell on 06/06/12 at 20:51:51.
Patch to fix TFTPFS on RTEMS 4.10 (v2)

Download all attachments as: .zip

Change History (9)

Changed on 07/20/10 at 04:04:07 by Angus Gratton

Attachment: tftp-patch-1.diff added

Patch to fix TFTPFS on RTEMS 4.10

comment:1 Changed on 07/20/10 at 23:42:27 by Chris Johns

Status: newassigned

comment:2 Changed on 07/20/10 at 23:43:46 by Chris Johns

blocked: 1625

comment:3 Changed on 05/22/12 at 08:12:33 by Sebastian Huber

Cc: Sebastian Huber added

comment:4 Changed on 06/05/12 at 14:07:17 by Dylan Maxwell

Cc: Dylan Maxwell added

Changed on 06/06/12 at 20:51:51 by Dylan Maxwell

Attachment: rtems-4.10-Bug1624.diff added

Patch to fix TFTPFS on RTEMS 4.10 (v2)

comment:5 Changed on 06/06/12 at 20:51:51 by Dylan Maxwell

attachments.isobsolete: 01

comment:6 Changed on 12/06/12 at 07:51:53 by Sebastian Huber

Resolution: fixed
Status: assignedclosed

comment:7 Changed on 12/06/12 at 07:52:39 by Sebastian Huber

Milestone: 4.114.10
Note: See TracTickets for help on using tickets.