Is NOBODY wrong in the post ? POST : I have two boys aged 8 and 10.

Yesterday I got a call from the school, I was told that my 10 year old was being put in detention for giving a kid a black eye. The situation was that the other boy was picking on my 8 year old, so he decided to punch him to defend his brother.

I obviously don't want my children being bullied, but I was furious at how he handled the situation. I did not bring him up to resolve conflicts with violence. I yelled at him asking why he would ever do such a thing, and when my 8 year old said I was being unfair I ended up yelling at him too. They were both sent to their room. I admit I did it out of anger, but I do believe it was justified punishment. Am I wrong?