Permalink
Browse files

Better fix for #1126

  • Loading branch information...
1 parent b97fc0c commit 87357eee9c5df596825ee3e0380d2c64b71de142 @bsdphk bsdphk committed with Tollef Fog Heen Apr 16, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/libvcl/vcc_acl.c
View
@@ -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) {
VSB_printf(tl->sb,
"Too wide mask (%u) for IPv4 address", ae->mask);
- vcc_ErrWhere(tl, ae->t_mask);
+ if (ae->t_mask != NULL)
+ vcc_ErrWhere(tl, ae->t_mask);
+ else
+ vcc_ErrWhere(tl, ae->t_addr);
return;
}
if (fam == PF_INET6 && ae->mask > 128) {
@@ -265,10 +268,8 @@ vcc_acl_try_netnotation(struct vcc *tl, struct acl_e *ae)
return (0);
p += k + 1;
}
- if (ae->t_mask == NULL) {
+ if (ae->t_mask == NULL)
ae->mask = 8 + 8 * i;
- ae->t_mask = ae->t_addr;
- }
vcc_acl_add_entry(tl, ae, 4, b, AF_INET);
return (1);
}

0 comments on commit 87357ee

Please sign in to comment.