Fixed BSD IP stack issue

Thanks to @mahomet