I have told my kids countless times after they come home with bully problems that I will never be mad if they get into trouble for defending themselves or standing up to a bully. I told them that I will handle whatever happens afterwords, and they won't be in any trouble at all as long as they didn't start it. I would far rather see my kid sit home knowing they stood up for themselves than have them afraid to retaliate if it is justified and go to school the next day.
I have told my kids I don't ever want them to start a fight, but I expect them to stand up for themselves and finish it, no matter what the principle says afterwords, thats going to be between him and I, and not to worry about it. Show them respect and let me handle the fallout.