Right, because the ships the pirates attacked were trying to hurt the Somali's. 
So basically your answer is no? You're just another wannabe throwing out terms like you've got some understanding on international maritime law. No problem, troll.
Haha yes i'm a troll

I have read legal interpretations on both sides, it's deemed legal by some, illegal by others. It depends on whether you believe the blockade itself is legal and whether the use of force was proportionate. Both up for interpretation, because this isn't going to a court of law anytime soon we will never have a definitive answer.
But keep thinking we do. The legality of the boarding does not mean the actions are any less of a precedent for others to mirror their actions.