diff options
Diffstat (limited to 'nest')
-rw-r--r-- | nest/config.Y | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y index 59d354b8..5b544e59 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -24,6 +24,17 @@ static list *this_p_list; static struct password_item *this_p_item; static int password_id; +static void +iface_patt_check(void) +{ + struct iface_patt_node *pn; + + WALK_LIST(pn, this_ipatt->ipn_list) + if (!pn->pattern || pn->pxlen) + cf_error("Interface name/mask expected, not IP prefix"); +} + + static inline void reset_passwords(void) { @@ -272,6 +283,9 @@ iface_patt_list: | iface_patt_list ',' iface_patt_node ; +/* For name/mask-only iface patterns */ +iface_patt_list_nopx: iface_patt_list { iface_patt_check(); } + iface_patt_init: { /* Generic this_ipatt init */ this_ipatt = cfg_allocz(sizeof(struct iface_patt)); |