1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

pfctl: relax interface name requirement

The FreeBSD network stack, for better or worse, does not impose any
requirements on interface names. As such it's valid for an interface
name to start with a number (or indeed, be something like '').

Allow this in pfctl, and add a test case for the specific case of
interface names starting with a number.

Note that we don't support UTF-8 names fully, so those may still fail.

PR:		295064
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost
2026-05-07 11:58:17 +02:00
parent 726ff260ec
commit 4e7c1ff95a
2 changed files with 41 additions and 1 deletions
+1 -1
View File
@@ -4242,7 +4242,7 @@ dynaddr : '(' STRING ')' {
char *p, *op;
op = $2;
if (!isalpha(op[0])) {
if (op[0] == '\0') {
yyerror("invalid interface name '%s'", op);
free(op);
YYERROR;