interface: fix default netmask size for AF_INET6 addresses (closes #130)
This commit is contained in:
parent
e1fb4c6087
commit
259851a829
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ lif_address_format_cidr(const struct lif_interface *iface, struct lif_dict_entry
|
||||||
if (!addr->netmask)
|
if (!addr->netmask)
|
||||||
{
|
{
|
||||||
/* if netmask is not set, default to 255.255.255.0, ifupdown does so too */
|
/* if netmask is not set, default to 255.255.255.0, ifupdown does so too */
|
||||||
addr->netmask = 24;
|
addr->netmask = addr->domain == AF_INET6 ? 64 : 24;
|
||||||
|
|
||||||
struct lif_dict_entry *entry = lif_dict_find(&iface->vars, "netmask");
|
struct lif_dict_entry *entry = lif_dict_find(&iface->vars, "netmask");
|
||||||
if (entry != NULL)
|
if (entry != NULL)
|
||||||
|
|
Loading…
Reference in a new issue