diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-26 21:01:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-26 21:01:04 +0000 |
commit | f82caec240a71362a5d0f2305c7f074be119948b (patch) | |
tree | c7c5b7e4e226a4be05146ddaad079135706497ea | |
parent | bce25c744476812cff3035c14ed6d917379ed0ac (diff) |
handle single char hostnames; jch@honig.net
-rw-r--r-- | lib/libpcap/scanner.l | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpcap/scanner.l b/lib/libpcap/scanner.l index 8f3a7d0f7cc..4741d903d64 100644 --- a/lib/libpcap/scanner.l +++ b/lib/libpcap/scanner.l @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: scanner.l,v 1.6 1997/07/22 07:42:32 deraadt Exp $ */ +/* $OpenBSD: scanner.l,v 1.7 1998/06/26 21:01:03 deraadt Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -24,7 +24,7 @@ #ifndef lint static char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.6 1997/07/22 07:42:32 deraadt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/lib/libpcap/scanner.l,v 1.7 1998/06/26 21:01:03 deraadt Exp $ (LBL)"; #endif #include <sys/types.h> @@ -133,7 +133,7 @@ outbound return OUTBOUND; {B}:{B}:{B}:{B}:{B}:{B} { yylval.e = pcap_ether_aton((char *)yytext); return EID; } {B}:+({B}:+)+ { bpf_error("bogus ethernet address %s", yytext); } -[A-Za-z0-9][-_.A-Za-z0-9]*[.A-Za-z0-9] { +[A-Za-z0-9]([-_.A-Za-z0-9]*[.A-Za-z0-9])? { yylval.s = sdup((char *)yytext); return ID; } "\\"[^ !()\n\t]+ { yylval.s = sdup((char *)yytext + 1); return ID; } [^ \[\]\t\n\-_.A-Za-z0-9!<>()&|=]+i { |