The Turkish act against the Russian airplane was probably not wise, but it was reasoned. This and other Russian airplanes have both been violating Turkish airspace in spite of adequate warnings and bombing Turkish allies, rather than ISIL, on the ground in Syria near the Turkish border. Remember that Turkey is adjacent to all this violence and would naturally wish to influence events in favor of their own security. It doesn't really matter where the SU-24 was when hit by the missile. The airplane had already crossed Turkish airspace more than once and can be classified as "unfriendly". The airspace was not exactly under Syria control at the time either, so claims of violating Syrian airspace sounds a bit strange considering all the US, French and other air activity over the country.