summaryrefslogtreecommitdiff
path: root/crypto/fcrypt.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2014-01-22 21:54:15 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-24 01:06:34 +0400
commit6ef7b8a23a2022915a7e1ac1a7b847ded7d977b1 (patch)
treeb92a6e3856decba5f1e2392dbbfb55387223030a /crypto/fcrypt.c
parenta1d0cd8ed5d315a1f2e9dec54920b73b9b30147b (diff)
downloadlinux-6ef7b8a23a2022915a7e1ac1a7b847ded7d977b1.tar.xz
net: Correctly sync addresses from multiple sources to single device
When we have multiple devices attempting to sync the same address to a single destination, each device should be permitted to sync it once. To accomplish this, pass the 'sync_cnt' of the source address when adding the addresss to the lower device. 'sync_cnt' tracks how many time a given address has been succefully synced. This way, we know that if the 'sync_cnt' passed in is 0, we should sync this address. Also, turn 'synced' member back into the counter as was originally done in commit 4543fbefe6e06a9e40d9f2b28d688393a299f079. net: count hw_addr syncs so that unsync works properly. It tracks how many time a given address has been added via a 'sync' operation. For every successfull 'sync' the counter is incremented, and for ever 'unsync', the counter is decremented. This makes sure that the address will be properly removed from the the lower device when all the upper devices have removed it. Reported-by: Andrey Dmitrov <andrey.dmitrov@oktetlabs.ru> CC: Andrey Dmitrov <andrey.dmitrov@oktetlabs.ru> CC: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru> CC: Konstantin Ushakov <Konstantin.Ushakov@oktetlabs.ru> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/fcrypt.c')
0 files changed, 0 insertions, 0 deletions