#1248 closed defect (fixed)

Network setup jumps to random address when no interfaces available

Reported by: Luke Stras Owned by: Eric Norum
Priority: low Milestone: 4.8
Component: network/legacy Version: 4.7
Severity: normal Keywords:
Cc: Blocked By:


When there are no available interfaces (i.e., no attach function completes successfully), rtems_bsdnet_setup will cause a jump to a random address. This is due to the fact that the address structure is not initialized until after the interface is fully configured; however, the default route is configured regardless of the existence of configured interfaces. Thus, the sa_family field of address is un-initialized; rtrequest then uses an invalid routing tree, and the code jumps off to hyperspace.

The fix seems easy enough: don't add the default route unless at least one interface has been configured successfully.

Attachments (1)

glue.patch (876 bytes) - added by Luke Stras on Jul 13, 2007 at 8:43:12 PM.
Proposed patch to fix bug.

Download all attachments as: .zip

Change History (2)

Changed on Jul 13, 2007 at 8:43:12 PM by Luke Stras

Attachment: glue.patch added

Proposed patch to fix bug.

comment:1 Changed on Jul 31, 2007 at 11:45:29 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch committed to 4.6, 4.7, and head.

Note: See TracTickets for help on using tickets.