handle port "ftp-data" trunk
authorchristos <christos@NetBSD.org>
Mon, 11 Mar 2013 00:09:07 +0000
branchtrunk
changeset 217198 1edd65705745
parent 217197 e2e772c5d36a
child 217199 49ea02753252
handle port "ftp-data"
usr.sbin/npf/npfctl/npf_parse.y
usr.sbin/npf/npfctl/todo
--- a/usr.sbin/npf/npfctl/npf_parse.y	Mon Mar 11 00:05:36 2013 +0000
+++ b/usr.sbin/npf/npfctl/npf_parse.y	Mon Mar 11 00:09:07 2013 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_parse.y,v 1.19 2013/03/10 23:11:26 christos Exp $	*/
+/*	$NetBSD: npf_parse.y,v 1.20 2013/03/11 00:09:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -677,6 +677,7 @@
 port
 	: NUM		{ $$ = $1; }
 	| IDENTIFIER	{ $$ = npfctl_portno($1); }
+	| STRING	{ $$ = npfctl_portno($1); }
 	;
 
 icmp_type_and_code
--- a/usr.sbin/npf/npfctl/todo	Mon Mar 11 00:05:36 2013 +0000
+++ b/usr.sbin/npf/npfctl/todo	Mon Mar 11 00:09:07 2013 +0000
@@ -1,4 +1,3 @@
--- parse "port ftp-data" properly
 -- how to convert other packet filters to npf
 -- have a way to use npflog to log packets to syslog
 -- have a way to match dropped packets to rules
@@ -21,3 +20,4 @@
 ok parse dynamic map rule properly inet4($ext_if) does not work
 ok create npflog interface automatically
 ok need to bring interface npflog up
+ok parse 'port "ftp-data"' properly