aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorChris Larson <clarson@mvista.com>2008-08-03 01:10:55 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-03 01:10:55 -0700
commit745e203164a9057e0de769ff4649e6e455daf753 (patch)
tree477d9342196113fdbbeceebcbf4968aafe463646 /net/core/dev.c
parentnet: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx. (diff)
downloadlinux-dev-745e203164a9057e0de769ff4649e6e455daf753.tar.xz
linux-dev-745e203164a9057e0de769ff4649e6e455daf753.zip
net: fix missing pneigh entries in the neighbor seq_file code
When pneigh entries exist, but the user's read buffer isn't sufficient to hold them all, one of the pneigh entries will be missing from the results. In neigh_get_idx_any, the number of elements which neigh_get_idx encountered is not correctly subtracted from the position number before the call to pneigh_get_idx. neigh_get_idx reduces the position by 1 for each call to neigh_get_next, but it does not reduce it by one for the first element (neigh_get_first). The patch alters the neigh_get_idx and pneigh_get_idx functions to subtract one from pos, for the first element, when pos is non-zero. Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions