They are not suspending the Schengen treaty, obviously. The treaty explicitly allows for temporary border controls.
Crossing the border to offload migrants on the other hand is obviously illegal.
How temporary is "temporary"? The border near Ventimiglia has been basically extra-Schengen for more than 3 years. I believe the Austrian border is not that different, just slightly less popular.