Revision 758458be nest/config.Y

View differences:

nest/config.Y
124 124

  
125 125
iface_patt:
126 126
   TEXT { this_ipatt->pattern = $1; this_ipatt->prefix = IPA_NONE; this_ipatt->pxlen = 0; }
127
 | IPA pxlen { this_ipatt->pattern = NULL; this_ipatt->prefix = $1; this_ipatt->pxlen = $2; }
128
 | TEXT IPA pxlen { this_ipatt->pattern = $1; this_ipatt->prefix = $2; this_ipatt->pxlen = $3; }
127
 | prefix { this_ipatt->pattern = NULL; this_ipatt->prefix = $1.addr; this_ipatt->pxlen = $1.len; }
128
 | TEXT prefix { this_ipatt->pattern = $1; this_ipatt->prefix = $2.addr; this_ipatt->pxlen = $2.len; }
129 129
 ;
130 130

  
131 131
/* Direct device route protocol */
......
250 250
     $$->filter = FILTER_ACCEPT;
251 251
     $$->table = config->master_rtc->table;
252 252
   }
253
 | r_args IPA pxlen {
253
 | r_args prefix {
254 254
     $$ = $1;
255 255
     if ($$->pxlen != 256) cf_error("Only one prefix expected");
256
     if (!ip_is_prefix($2, $3)) cf_error("Invalid prefix");
257
     $$->prefix = $2;
258
     $$->pxlen = $3;
256
     $$->prefix = $2.addr;
257
     $$->pxlen = $2.len;
259 258
   }
260 259
 | r_args TABLE SYM {
261 260
     $$ = $1;

Also available in: Unified diff