-/* $OpenBSD: parse.y,v 1.453 2023/04/26 18:14:28 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.454 2023/04/28 13:23:52 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
complen = PREFIX_SIZE(len) + 1;
data = &addr->v6;
break;
+ default:
+ yyerror("unsupported address family for flowspec address");
+ return -1;
}
comp = malloc(complen);
if (comp == NULL) {
-/* $OpenBSD: printconf.c,v 1.166 2023/04/21 10:48:33 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.167 2023/04/28 13:23:52 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
const char *fmt, *flags;
int complen, off = 0;
- if (flowspec_get_component(f->data, f->len, type, is_v6,
- &comp, &complen) != 1)
- return;
-
- printf("%s ", flowspec_fmt_label(type));
-
switch (type) {
case FLOWSPEC_TYPE_TCP_FLAGS:
flags = FLOWSPEC_TCP_FLAG_STRING;
else
flags = FLOWSPEC_FRAG_STRING6;
break;
+ default:
+ printf("??? ");
+ return;
}
+ if (flowspec_get_component(f->data, f->len, type, is_v6,
+ &comp, &complen) != 1)
+ return;
+
+ printf("%s ", flowspec_fmt_label(type));
+
fmt = flowspec_fmt_bin_op(comp, complen, &off, flags);
if (off == -1) {
printf("%s ", fmt);