Revision 04632fd7 nest/config.Y
nest/config.Y | ||
---|---|---|
30 | 30 |
struct iface_patt_node *pn; |
31 | 31 |
|
32 | 32 |
WALK_LIST(pn, this_ipatt->ipn_list) |
33 |
if (!pn->pattern || pn->prefix.pxlen) /* XXXX */
|
|
33 |
if (!pn->pattern || pn->prefix.type)
|
|
34 | 34 |
cf_error("Interface name/mask expected, not IP prefix"); |
35 | 35 |
} |
36 | 36 |
|
... | ... | |
85 | 85 |
|
86 | 86 |
CF_ADDTO(conf, rtrid) |
87 | 87 |
|
88 |
rtrid:
|
|
88 |
rtrid: |
|
89 | 89 |
ROUTER ID idval ';' { new_config->router_id = $3; } |
90 | 90 |
| ROUTER ID FROM iface_patt ';' { new_config->router_id_from = this_ipatt; } |
91 | 91 |
; |
... | ... | |
261 | 261 |
; |
262 | 262 |
|
263 | 263 |
iface_patt_node_body: |
264 |
TEXT { this_ipn->pattern = $1; net_fill_ip6(&this_ipn->prefix, IP6_NONE, 0); /* XXXX */ }
|
|
265 |
| opttext net_or_ipa { this_ipn->pattern = $1; this_ipn->prefix = $2.n; }
|
|
264 |
TEXT { this_ipn->pattern = $1; /* this_ipn->prefix stays zero */ }
|
|
265 |
| opttext net_or_ipa { this_ipn->pattern = $1; this_ipn->prefix = $2; } |
|
266 | 266 |
; |
267 | 267 |
|
268 | 268 |
iface_negate: |
... | ... | |
271 | 271 |
; |
272 | 272 |
|
273 | 273 |
iface_patt_node: |
274 |
iface_patt_node_init iface_negate iface_patt_node_body
|
|
274 |
iface_patt_node_init iface_negate iface_patt_node_body |
|
275 | 275 |
; |
276 | 276 |
|
277 | 277 |
|
... | ... | |
450 | 450 |
} |
451 | 451 |
| r_args net_any { |
452 | 452 |
$$ = $1; |
453 |
if ($$->prefix) cf_error("Only one prefix expected");
|
|
454 |
$$->prefix = $2;
|
|
453 |
if ($$->addr) cf_error("Only one prefix expected");
|
|
454 |
$$->addr = $2;
|
|
455 | 455 |
} |
456 | 456 |
| r_args FOR net_or_ipa { |
457 | 457 |
$$ = $1; |
458 |
if ($$->prefix) cf_error("Only one prefix expected"); |
|
459 |
$$->prefix = &($3.n); |
|
458 |
if ($$->addr) cf_error("Only one prefix expected"); |
|
460 | 459 |
$$->show_for = 1; |
460 |
$$->addr = cfg_alloc($3.length); |
|
461 |
net_copy($$->addr, &($3)); |
|
461 | 462 |
} |
462 | 463 |
| r_args TABLE SYM { |
463 | 464 |
$$ = $1; |
Also available in: Unified diff