Comment 4 for bug 1483440

Revision history for this message
Andy Whitcroft (apw) wrote :

This appears to be an off-by-one issue when handling reads which are smaller than the overall returned size for the table. This is easily spotted in the read line by line mode triggered in the following test script:

  #!/bin/bash
  while read l
  do
          echo "$l"
  done </proc/net/route

Though in my tests it also triggers with cat /proc/net/route when you have more than 8K worth of routes, occuring at the 8K boundary.

The underlying issue is that the code does not correctly take into account the header when starting from anywhere but the beginning. This leads us to drop the first set of entries on restart.