/*
* firewall3 - 3rd OpenWrt UCI firewall implementation
*
- * Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ * Copyright (C) 2013 Jo-Philipp Wich <jo@mein.io>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
return false;
v4 = mask;
- v4->s_addr = htonl(~((1 << (32 - abs(bits))) - 1));
+ v4->s_addr = bits ? htonl(~((1 << (32 - abs(bits))) - 1)) : 0;
if (bits < 0)
v4->s_addr = ~v4->s_addr;