... for the reasons the other guy said:
https://news.ycombinator.com/item?id=41011627DoS attacks attempt to overwhelm your system or your system's connection by sheer amount of packets. And here you are capturing those packets and keeping them in memory - this just makes your system fall over faster.