aboutsummaryrefslogtreecommitdiff
path: root/sbin/setkey
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-05-17 15:30:49 +0000
committerBrian Somers <brian@FreeBSD.org>2001-05-17 15:30:49 +0000
commitf1b1c5da22766b924ed2e33f96c11dd5349f5948 (patch)
tree72aa69f592dc373f27b7490c4466ce0d0507e98d /sbin/setkey
parent10d865720bdf1938703cd25dd2e7ca0973d919d9 (diff)
downloadsrc-f1b1c5da22766b924ed2e33f96c11dd5349f5948.tar.gz
src-f1b1c5da22766b924ed2e33f96c11dd5349f5948.zip
Allow ``ip4'' as an ``upperspec'' value, and update the man
page with *all* the permissible values. This should really be spelt ipencap (as /etc/protocols does), but a precedent has already been set by the ipproto array in setkey.c. It would be nice if /etc/protocols was parsed for the upperspec field, but I don't do yacc/lex... This change allows policies that only encrypt the encapsulated packets passing between the endpoints of a gif tunnel. Setting such a policy means that you can still talk directly (and unencrypted) between the public IP numbers with (say) ssh. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=76750
Diffstat (limited to 'sbin/setkey')
-rw-r--r--sbin/setkey/setkey.83
-rw-r--r--sbin/setkey/token.l1
2 files changed, 4 insertions, 0 deletions
diff --git a/sbin/setkey/setkey.8 b/sbin/setkey/setkey.8
index 3bfcada11b46..792180064ecc 100644
--- a/sbin/setkey/setkey.8
+++ b/sbin/setkey/setkey.8
@@ -366,6 +366,9 @@ They must be in numeric form.
.It Ar upperspec
Upper-layer protocol to be used.
Currently
+.Li icmp ,
+.Li icmp6 ,
+.Li ip4 ,
.Li tcp ,
.Li udp
and
diff --git a/sbin/setkey/token.l b/sbin/setkey/token.l
index 8916fdd79ee8..c2eaad5ac5e8 100644
--- a/sbin/setkey/token.l
+++ b/sbin/setkey/token.l
@@ -200,6 +200,7 @@ nocyclic-seq { PREPROC; return(NOCYCLICSEQ); }
/* upper layer protocols */
icmp { PREPROC; yylval.num = IPPROTO_ICMP; return(UP_PROTO); }
icmp6 { PREPROC; yylval.num = IPPROTO_ICMPV6; return(UP_PROTO); }
+ip4 { PREPROC; yylval.num = IPPROTO_IPV4; return(UP_PROTO); }
tcp { PREPROC; yylval.num = IPPROTO_TCP; return(UP_PROTO); }
udp { PREPROC; yylval.num = IPPROTO_UDP; return(UP_PROTO); }