Well the west supported the Mujahideen in Afganistan on the theory that "My enemies enemy is my friend " turned out to be wrong. Syria is a disaster and even if Daesh is defeated there it will be decades before the devastation is reversed. The Assad regimes have generally sourced their military hardware from the USSR/Russia and with the understandable lack of support from the west it's no surprise he's looked east.
Putin loves flexing his military, not sure he wants to get bogged down in a long messy civil war. He may be worried that Daesh/Isil success may set the Chechens off again. I suspect he's looking for some quick dramatic press-worthy successes, not sure he'll get them.