Gandhi didn't accept distinctions between "just" and "unjust" wars, in his mind every war was unjust. He was firm in the opinion that "war" is not a morally legitimate means of achieving anything permanent.
Mohandas Karamchand Gandhi, who was in South Africa at the time, felt that the Indians in South Africa would do best for themselves to serve the British Empire as a reserve force in the Army against the Zulu uprising. Gandhi actively encouraged the British to recruit Indians.