summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaterina.kubecova <katerina.kubecova@nic.cz>2023-09-18 14:07:59 +0200
committerMaria Matejka <mq@ucw.cz>2023-09-20 14:03:41 +0200
commitcc122bf0c295207a909061a365eccd49462b1b16 (patch)
treebb0074e690eac25bf5a33d14a836e8898dd6d338
parent8cc9d198c7ab906e176a7926484ea85d4f53cab6 (diff)
Attributes declared in config can be bytestrings
-rw-r--r--filter/f-inst.c5
-rw-r--r--filter/f-util.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c
index c56d874b..510c431f 100644
--- a/filter/f-inst.c
+++ b/filter/f-inst.c
@@ -869,10 +869,6 @@
l->attrs[0].u.data = v1.val.i;
break;
- case EAF_TYPE_OPAQUE:
- runtime( "Setting opaque attribute is not allowed" );
- break;
-
case EAF_TYPE_IP_ADDRESS:;
int len = sizeof(ip_addr);
struct adata *ad = lp_alloc(fs->pool, sizeof(struct adata) + len);
@@ -881,6 +877,7 @@
l->attrs[0].u.ptr = ad;
break;
+ case EAF_TYPE_OPAQUE:
case EAF_TYPE_AS_PATH:
case EAF_TYPE_INT_SET:
case EAF_TYPE_EC_SET:
diff --git a/filter/f-util.c b/filter/f-util.c
index d589927a..a47a8747 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -294,6 +294,9 @@ ca_lookup(pool *p, const char *name, int f_type)
case T_LCLIST:
ea_type = EAF_TYPE_LC_SET;
break;
+ case T_BYTESTRING:
+ ea_type = EAF_TYPE_OPAQUE;
+ break;
default:
cf_error("Custom route attribute of unsupported type");
}