aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2018-12-21 10:41:45 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2018-12-21 10:41:45 +0000
commita5178bca193fda9e3abf73747e538d993d3ad29c (patch)
treecb1f195b70c7fd022c4d00879050dc77b4f9442b /sbin/ipfw
parent9e5ed8593f6bf24929021e092e2de23e8ed9e7b8 (diff)
downloadsrc-a5178bca193fda9e3abf73747e538d993d3ad29c.tar.gz
src-a5178bca193fda9e3abf73747e538d993d3ad29c.zip
Allow use underscores and dots in service names without escaping.
PR: 234237 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=342298
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 3a41deaca448..775096c9cb98 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -940,7 +940,8 @@ strtoport(char *s, char **end, int base, int proto)
/*
* find separator. '\\' escapes the next char.
*/
- for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\') ; s1++)
+ for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\' ||
+ *s1 == '_' || *s1 == '.') ; s1++)
if (*s1 == '\\' && s1[1] != '\0')
s1++;