Asteroider: The surface relationship between Russia is as friends but there is a lot of friction under the surface. Several analysts describe them as frenemies.
I'm not an expert on Iran but I guess the friction comes from those blocks within Iran that seek empire, vassal states and something of a Shia Caliphate centred in Iran. The problem for Russia is that it does not have a huge economy and its military, while capable, is stretched. Iran does views itself as a peer of Russia, not a subordinate.
Iran will also use any further conflict between Erdogan and the Kurds as a way to garnish Kurdish favour.
Russia will now play realpolitik IMHO. On the one hand it will supply the S300's (which should be more able to distinguish friend from foe than the antiquated stuff they gave the Syrians) but on the other hand they may create a necessary buffer between Iran and Israel. Russia may or may not seek to close down the rat lines. Who knows what they will do or whether or not it will work.