I don't know shit about international maritime law but this little bit seems to legalize Israel's actions.
The San Remo Manual on International Law Applicable to Armed Conflicts at Sea–an international treaty in effect since June 12, 1994SECTION V : NEUTRAL MERCHANT VESSELS AND CIVIL AIRCRAFT
Neutral merchant vessels
67. Merchant vessels flying the flag of neutral States may not be attacked unless they:
(a) are believed on reasonable grounds to be carrying contraband or breaching a blockade, and after prior warning they intentionally and clearly refuse to stop, or intentionally and clearly resist visit, search or capture;
(b) engage in belligerent acts on behalf of the enemy;
(c) act as auxiliaries to the enemy s armed forces;
(d) are incorporated into or assist the enemy s intelligence system;
(e) sail under convoy of enemy warships or military aircraft; or
(f) otherwise make an effective contribution to the enemy’s military action, e.g., by carrying military materials, and it is not feasible for the attacking forces to first place passengers and crew in a place of safety.Unless circumstances do not permit, they are to be given a warning, so that they can re-route, off-load, or take other precautions.
Those flotillas ticked off quite a few of those justifications.