/*
* 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
{
struct fw3_ipset *ipset;
- ipset = malloc(sizeof(*ipset));
-
+ ipset = calloc(1, sizeof(*ipset));
if (!ipset)
return NULL;
- memset(ipset, 0, sizeof(*ipset));
-
INIT_LIST_HEAD(&ipset->datatypes);
ipset->enabled = true;
if (ipset->iprange.set)
{
- fw3_pr(" range %s", fw3_address_to_string(&ipset->iprange, false));
+ fw3_pr(" range %s", fw3_address_to_string(&ipset->iprange, false, true));
}
else if (ipset->portrange.set)
{