Modify

Opened 12 years ago

Closed 12 years ago

#455 closed defect (fixed)

l2tpd blocks in read()

Reported by: b.candler@… Owned by: nico
Priority: high Milestone: 0.9/rc6
Component: packages Version:
Keywords: Cc:

Description

l2tpd blocks in a read() system call when reading data from the ppp child process. More details in the thread at http://forum.openwrt.org/viewtopic.php?id=4881

A workaround patch, which fixes this problem by making a select() call before read(), is at http://psg.com/~brian/software/openwrt/04-nonblock.patch

(install into package/l2tpd/patches/ directory)

I think this bug is really a side-effect of package/l2tpd/patches/03-jacco-pty.patch; this removed the original getPtyMaster() function, which opened the pty in O_NONBLOCK mode, and instead opens /dev/ptmx. Maybe a better solution is to modify this patch so that the socket is made non-blocking, perhaps with fcntl F_GETFL/F_SETFL ?

Attachments (2)

04-nonblock.patch.alt (674 bytes) - added by b.candler@… 12 years ago.
04-nonblock.patch (752 bytes) - added by b.candler@… 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by b.candler@…

I have made an alternative patch which puts the pty in O_NONBLOCK mode, at http://psg.com/~brian/software/openwrt/04-nonblock.patch.alt

This also seems to do the trick, and is arguably a cleaner solution.

Changed 12 years ago by b.candler@…

Changed 12 years ago by b.candler@…

comment:2 Changed 12 years ago by nico

  • Milestone set to 1.0-rc6
  • Owner changed from developers to nico
  • Status changed from new to assigned

comment:3 Changed 12 years ago by nico

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [3597]

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.