MT#5301 add upstream patches