South Africa is cracking down on undocumented migrants following widespread anti-immigration protests.