diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-27 18:26:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-09-27 18:26:58 +0000 |
commit | e6a4eea15b611e8635b0803a8a764086910c350b (patch) | |
tree | 75105dbecb897acf3acce7fdf27b6f8ec36b169b /lib | |
parent | 703258fa62936708a6130e0ed1a085cc8091f482 (diff) |
accept hostnames 1 char long; spotted by otto, ok otto
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpcap/scanner.l | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpcap/scanner.l b/lib/libpcap/scanner.l index 6273c7a97e9..8b9e3f5cfcf 100644 --- a/lib/libpcap/scanner.l +++ b/lib/libpcap/scanner.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scanner.l,v 1.14 2003/05/14 08:50:37 canacar Exp $ */ +/* $OpenBSD: scanner.l,v 1.15 2005/09/27 18:26:57 deraadt Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.14 2003/05/14 08:50:37 canacar Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.15 2005/09/27 18:26:57 deraadt Exp $ (LBL)"; #endif #include <sys/types.h> @@ -264,6 +264,7 @@ action return PF_ACTION; {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } [A-Za-z0-9][-_.A-Za-z0-9]*[.A-Za-z0-9] { yylval.s = sdup((char *)yytext); return ID; } +[A-Za-z] { yylval.s = sdup((char *)yytext); return ID; } "\\"[^ !()\n\t]+ { yylval.s = sdup((char *)yytext + 1); return ID; } [^ \[\]\t\n\-_.A-Za-z0-9!<>()&|=]+i { bpf_error("illegal token: %s\n", yytext); } |