0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Merge commit '224a152c53f304881f8616a1c9255b467062a069' into thread-next

This commit is contained in:
Ondrej Zajicek 2024-03-28 16:22:23 +01:00
commit c195c7a0d5
3 changed files with 17 additions and 16 deletions

View File

@ -946,22 +946,10 @@ term:
| '-' '-' EMPTY '-' '-' { $$ = f_new_inst(FI_CONSTANT, f_get_empty(T_ECLIST)); }
| '-' '-' '-' EMPTY '-' '-' '-' { $$ = f_new_inst(FI_CONSTANT, f_get_empty(T_LCLIST)); }
| PREPEND '(' term ',' term ')' {
$$ = f_dispatch_method_x("prepend", $3->type, $3, $5);
cf_warn("prepend(x,y) function is deprecated, please use x.prepend(y)");
}
| ADD '(' term ',' term ')' {
$$ = f_dispatch_method_x("add", $3->type, $3, $5);
cf_warn("add(x,y) function is deprecated, please use x.add(y)");
}
| DELETE '(' term ',' term ')' {
$$ = f_dispatch_method_x("delete", $3->type, $3, $5);
cf_warn("delete(x,y) function is deprecated, please use x.delete(y)");
}
| FILTER '(' term ',' term ')' {
$$ = f_dispatch_method_x("filter", $3->type, $3, $5);
cf_warn("filter(x,y) function is deprecated, please use x.filter(y)");
}
| PREPEND '(' term ',' term ')' { $$ = f_dispatch_method_x("prepend", $3->type, $3, $5); }
| ADD '(' term ',' term ')' { $$ = f_dispatch_method_x("add", $3->type, $3, $5); }
| DELETE '(' term ',' term ')' { $$ = f_dispatch_method_x("delete", $3->type, $3, $5); }
| FILTER '(' term ',' term ')' { $$ = f_dispatch_method_x("filter", $3->type, $3, $5); }
| ROA_CHECK '(' rtable ')' { $$ = f_implicit_roa_check($3); }
| ROA_CHECK '(' rtable ',' term ',' term ')' { $$ = f_new_inst(FI_ROA_CHECK, $5, $7, $3); }

View File

@ -874,6 +874,11 @@
case T_IP:
RESULT_(T_IP, ip, *((const ip_addr *) e->u.ptr->data));
break;
case T_STRING:
RESULT_(T_STRING, s, (const char *) e->u.ptr->data);
break;
default:
RESULT_VAL([[(struct f_val) {
.type = e->type,
@ -916,6 +921,11 @@
EA_LITERAL_STORE_ADATA(da, 0, &v1.val.ip, sizeof(ip_addr)));
break;
case T_STRING:
a = ea_set_attr(&fs->rte->attrs,
EA_LITERAL_STORE_ADATA(da, 0, &v1.val.s, strlen(v1.val.s) + 1));
break;
default:
a = ea_set_attr(&fs->rte->attrs,
EA_LITERAL_GENERIC(da->id, da->type, 0, .u = v1.val.bval));

View File

@ -1446,6 +1446,9 @@ ea_show(struct cli *c, const eattr *e)
case T_LCLIST:
ea_show_lc_set(c, cls->name, ad, buf);
return;
case T_STRING:
bsnprintf(pos, end - pos, "%s", (const char *) ad->data);
break;
case T_NEXTHOP_LIST:
ea_show_nexthop_list(c, (struct nexthop_adata *) e->u.ptr);
return;