diff --git a/sbin/setkey/parse.y b/sbin/setkey/parse.y index 00e39d7a5029..3d23b4f7ac83 100644 --- a/sbin/setkey/parse.y +++ b/sbin/setkey/parse.y @@ -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 @@ void free_buffer __P((void)); 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 @@ extern void yyerror __P((const char *)); %token SPDADD SPDDELETE SPDDUMP SPDFLUSH %token F_POLICY PL_REQUESTS %token F_AIFLAGS -%token TAGGED %type prefix protocol_spec upper_spec %type ALG_ENC ALG_ENC_DESDERIV ALG_ENC_DES32IV ALG_ENC_OLD ALG_ENC_NOKEY @@ -504,15 +502,6 @@ spdadd_command 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 @@ setkeymsg_spdaddr(type, upper, policy, srcs, splen, dsts, dplen) 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 --git a/sbin/setkey/token.l b/sbin/setkey/token.l index cbf8eecdf067..a4c8ea5d3aa1 100644 --- a/sbin/setkey/token.l +++ b/sbin/setkey/token.l @@ -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 @@ spdadd { return(SPDADD); } spddelete { return(SPDDELETE); } spddump { return(SPDDUMP); } spdflush { return(SPDFLUSH); } -tagged { return(TAGGED); } {hyphen}P { BEGIN S_PL; return(F_POLICY); } [a-zA-Z0-9:\.\-_/ \n\t][a-zA-Z0-9:\.%\-_/ \n\t]* { yymore();