Added atomic variable to control the main loop from the outside, and fixed memory leaks. Tested it out, was successfully able to take down my roommates internet and reinstate it by enabling IP forwarding on my machine (and then later I stopped messing with him