[RTEMS Project] #4494: pppd broken if serial driver can't handle big data

RTEMS trac trac at rtems.org
Tue Aug 17 06:36:23 UTC 2021


#4494: pppd broken if serial driver can't handle big data
--------------------------------+---------------------------------
 Reporter:  Christian Mauderer  |       Owner:  Christian Mauderer
     Type:  defect              |      Status:  assigned
 Priority:  normal              |   Milestone:
Component:  network/libbsd      |     Version:  5
 Severity:  normal              |  Resolution:
 Keywords:                      |  Blocked By:
 Blocking:                      |
--------------------------------+---------------------------------

Comment (by Christian Mauderer):

 I posted a patch set here:
 https://lists.rtems.org/pipermail/devel/2021-August/068890.html

 The problem is that our pppd installs a line discipline that basically
 ignores all buffering of termios. Instead it directly uses the raw console
 driver write. There it just assumes that a write can write any number of
 characters without problems:

 https://git.rtems.org/rtems-
 libbsd/tree/rtemsbsd/sys/net/ppp_tty.c?id=02373194fe0be1ef82db419bedbf9d6ffd31dc93#n646

 Our device write doesn't return how many characters it was able to handle.
 Instead it provides that info to termios via the
 rtems_termios_dequeue_characters() function. But this information never
 reaches the pppstart function. Therefore I adapted the interface so that
 the information is passed to the pppstart and pppstart can process it.

 The alternatives would have been to let the driver write return the number
 of characters (which would touch all drivers and maybe would be a problem
 sometimes) or completely rewrite the pppd to not use any line discipline
 functions (which would have touched a lot of code with so much edge cases
 that I'm definitively not able to test it thouroghly).

--
Ticket URL: <http://devel.rtems.org/ticket/4494#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list