LINUX: Fix error queue processing
authorAndrew Deason <adeason@sinenomine.net>
Wed, 1 Aug 2012 20:31:09 +0000 (16:31 -0400)
committerDerrick Brashear <shadow@dementix.org>
Thu, 9 Aug 2012 15:04:29 +0000 (08:04 -0700)
commit407cfd281eab375512881945999b7e13ba93936e
tree1e9aef3cf42f856e451a179b2c18f86954a7a398
parentd55df0ac8351b1518d2c3cde6e3938b98b3f21f7
LINUX: Fix error queue processing

Receiving error queues in the Linux kernel is a little different from
userspace. When we encounter a cmsg that is not CMSG_OK, we need to
break out of the loop, and not just continue, since we can keep trying
to process the same cmsg over and over. In addition, on successful
return, the msg_control buffer has been modified to point to the next
available buffer space, and msg_controllen contains how many bytes are
remaining. So, we need to adjust the msg_control and msg_controllen
values to get something more familiar.

Change-Id: I7cc768ea31379915974431d2a3c1fec5e0ac71bb
Reviewed-on: http://gerrit.openafs.org/7927
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/rx/LINUX/rx_knet.c