Commit 87357eee authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Better fix for #1126

parent b97fc0cd
...@@ -103,7 +103,10 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l, ...@@ -103,7 +103,10 @@ vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
if (fam == PF_INET && ae->mask > 32) { if (fam == PF_INET && ae->mask > 32) {
VSB_printf(tl->sb, VSB_printf(tl->sb,
"Too wide mask (%u) for IPv4 address", ae->mask); "Too wide mask (%u) for IPv4 address", ae->mask);
if (ae->t_mask != NULL)
vcc_ErrWhere(tl, ae->t_mask); vcc_ErrWhere(tl, ae->t_mask);
else
vcc_ErrWhere(tl, ae->t_addr);
return; return;
} }
if (fam == PF_INET6 && ae->mask > 128) { if (fam == PF_INET6 && ae->mask > 128) {
...@@ -265,10 +268,8 @@ vcc_acl_try_netnotation(struct vcc *tl, struct acl_e *ae) ...@@ -265,10 +268,8 @@ vcc_acl_try_netnotation(struct vcc *tl, struct acl_e *ae)
return (0); return (0);
p += k + 1; p += k + 1;
} }
if (ae->t_mask == NULL) { if (ae->t_mask == NULL)
ae->mask = 8 + 8 * i; ae->mask = 8 + 8 * i;
ae->t_mask = ae->t_addr;
}
vcc_acl_add_entry(tl, ae, 4, b, AF_INET); vcc_acl_add_entry(tl, ae, 4, b, AF_INET);
return (1); return (1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment