It should be possible to move link state handling code in socklnd and o2iblnd to a common module (e.g. lib-socket?) to avoid duplication.