A friend of mine had his dog's anal gland burst, it was horrible!
You should take your pup to the vet!