Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/setkey committed by mistake



details:   https://anonhg.NetBSD.org/src/rev/4abaa10f117f
branches:  trunk
changeset: 551536:4abaa10f117f
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Sep 07 22:20:05 2003 +0000

description:
committed by mistake

diffstat:

 sbin/setkey/parse.y |  53 +----------------------------------------------------
 sbin/setkey/token.l |   3 +--
 2 files changed, 2 insertions(+), 54 deletions(-)

diffs (105 lines):

diff -r 57b61b7e6644 -r 4abaa10f117f sbin/setkey/parse.y
--- a/sbin/setkey/parse.y       Sun Sep 07 22:18:58 2003 +0000
+++ b/sbin/setkey/parse.y       Sun Sep 07 22:20:05 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.y,v 1.12 2003/09/07 22:18:58 itojun Exp $        */
+/*     $NetBSD: parse.y,v 1.13 2003/09/07 22:20:05 itojun Exp $        */
 /*     $KAME: parse.y,v 1.80 2003/06/27 07:15:45 itojun Exp $  */
 
 /*
@@ -72,7 +72,6 @@
 int setkeymsg0 __P((struct sadb_msg *, unsigned int, unsigned int, size_t));
 static int setkeymsg_spdaddr __P((unsigned int, unsigned int, vchar_t *,
        struct addrinfo *, int, struct addrinfo *, int));
-static int setkeymsg_spdaddr_tag __P((unsigned int, char *, vchar_t *));
 static int setkeymsg_addr __P((unsigned int, unsigned int,
        struct addrinfo *, struct addrinfo *, int));
 static int setkeymsg_add __P((unsigned int, unsigned int,
@@ -107,7 +106,6 @@
 %token SPDADD SPDDELETE SPDDUMP SPDFLUSH
 %token F_POLICY PL_REQUESTS
 %token F_AIFLAGS
-%token TAGGED
 
 %type <num> prefix protocol_spec upper_spec
 %type <num> ALG_ENC ALG_ENC_DESDERIV ALG_ENC_DES32IV ALG_ENC_OLD ALG_ENC_NOKEY
@@ -504,15 +502,6 @@
                        if (status < 0)
                                return -1;
                }
-       |       SPDADD TAGGED QUOTEDSTRING policy_spec EOT
-               {
-                       int status;
-
-                       status = setkeymsg_spdaddr_tag(SADB_X_SPDADD,
-                           $3.buf, &$4);
-                       if (status < 0)
-                               return -1;
-               }
        ;
 
 spddelete_command
@@ -809,46 +798,6 @@
                return 0;
 }
 
-static int
-setkeymsg_spdaddr_tag(type, tag, policy)
-       unsigned int type;
-       char *tag;
-       vchar_t *policy;
-{
-       struct sadb_msg *msg;
-       char buf[BUFSIZ];
-       int l, l0;
-       struct sadb_x_tag m_tag;
-       int n;
-
-       msg = (struct sadb_msg *)buf;
-
-       /* fix up length afterwards */
-       setkeymsg0(msg, type, SADB_SATYPE_UNSPEC, 0);
-       l = sizeof(struct sadb_msg);
-
-       memcpy(buf + l, policy->buf, policy->len);
-       l += policy->len;
-
-       l0 = l;
-       n = 0;
-
-       memset(&m_tag, 0, sizeof(m_tag));
-       m_tag.sadb_x_tag_len = PFKEY_UNIT64(sizeof(m_tag));
-       m_tag.sadb_x_tag_exttype = SADB_X_EXT_TAG;
-       if (strlcpy(m_tag.sadb_x_tag_name, tag,
-           sizeof(m_tag.sadb_x_tag_name)) >= sizeof(m_tag.sadb_x_tag_name))
-               return -1;
-       memcpy(buf + l, &m_tag, sizeof(m_tag));
-       l += sizeof(m_tag);
-
-       msg->sadb_msg_len = PFKEY_UNIT64(l);
-
-       sendkeymsg(buf, l);
-
-       return 0;
-}
-
 /* XXX NO BUFFER OVERRUN CHECK! BAD BAD! */
 static int
 setkeymsg_addr(type, satype, srcs, dsts, no_spi)
diff -r 57b61b7e6644 -r 4abaa10f117f sbin/setkey/token.l
--- a/sbin/setkey/token.l       Sun Sep 07 22:18:58 2003 +0000
+++ b/sbin/setkey/token.l       Sun Sep 07 22:20:05 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: token.l,v 1.12 2003/09/07 22:18:58 itojun Exp $        */
+/*     $NetBSD: token.l,v 1.13 2003/09/07 22:20:05 itojun Exp $        */
 /*     $KAME: token.l,v 1.43 2003/07/25 09:35:28 itojun Exp $  */
 
 /*
@@ -106,7 +106,6 @@
 spddelete      { return(SPDDELETE); }
 spddump                { return(SPDDUMP); }
 spdflush       { return(SPDFLUSH); }
-tagged         { return(TAGGED); }
 {hyphen}P      { BEGIN S_PL; return(F_POLICY); }
 <S_PL>[a-zA-Z0-9:\.\-_/ \n\t][a-zA-Z0-9:\.%\-_/ \n\t]* {
                        yymore();



Home | Main Index | Thread Index | Old Index