Forward ported patches from version 2.32, and refreshed them so they apply clean. Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>