starter: Remove left|rightnexthop option.
authorTobias Brunner <tobias@strongswan.org>
Mon, 14 May 2012 16:27:53 +0000 (18:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 11 Jun 2012 15:33:30 +0000 (17:33 +0200)
Charon does this lookup dynamically.

src/starter/args.c
src/starter/cmp.c
src/starter/confread.c
src/starter/confread.h
src/starter/keywords.h
src/starter/keywords.txt

index a9a1632..3531bf7 100644 (file)
@@ -271,7 +271,6 @@ static const token_info_t token_info[] =
        /* end keywords */
        { ARG_STR,  offsetof(starter_end_t, host), NULL                                },
        { ARG_UINT, offsetof(starter_end_t, ikeport), NULL                             },
-       { ARG_MISC, 0, NULL  /* KW_NEXTHOP */                                          },
        { ARG_STR, offsetof(starter_end_t, subnet), NULL                               },
        { ARG_MISC, 0, NULL  /* KW_SUBNETWITHIN */                                     },
        { ARG_MISC, 0, NULL  /* KW_PROTOPORT */                                        },
index 0072e3e..f13314e 100644 (file)
@@ -43,7 +43,6 @@ starter_cmp_end(starter_end_t *c1, starter_end_t *c2)
                ADDCMP(addr);
        }
        VARCMP(ikeport);
-       ADDCMP(nexthop);
        VARCMP(has_client);
        VARCMP(has_client_wildcard);
        VARCMP(has_port_wildcard);
index e674a6a..cc94b85 100644 (file)
@@ -106,9 +106,7 @@ static void default_values(starter_config_t *cfg)
        cfg->conn_default.right.sendcert = CERT_SEND_IF_ASKED;
 
        anyaddr(AF_INET, &cfg->conn_default.left.addr);
-       anyaddr(AF_INET, &cfg->conn_default.left.nexthop);
        anyaddr(AF_INET, &cfg->conn_default.right.addr);
-       anyaddr(AF_INET, &cfg->conn_default.right.nexthop);
        cfg->conn_default.left.ikeport = 500;
        cfg->conn_default.right.ikeport = 500;
 
@@ -336,22 +334,6 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token,
        /* individual processing of keywords that were not assigned automatically */
        switch (token)
        {
-       case KW_NEXTHOP:
-               if (streq(value, "%direct"))
-               {
-                       ugh = anyaddr(conn->addr_family, &end->nexthop);
-               }
-               else
-               {
-                       conn->addr_family = ip_version(value);
-                       ugh = ttoaddr(value, 0, conn->addr_family, &end->nexthop);
-               }
-               if (ugh != NULL)
-               {
-                       DBG1(DBG_APP, "# bad addr: %s=%s [%s]", name, value, ugh);
-                       goto err;
-               }
-               break;
        case KW_SUBNETWITHIN:
        {
                ip_subnet net;
index 0907997..42f9983 100644 (file)
@@ -68,7 +68,6 @@ struct starter_end {
                char            *host;
                ip_address      addr;
                u_int           ikeport;
-               ip_address      nexthop;
                char            *subnet;
                bool            has_client;
                bool            has_client_wildcard;
index 3374fa8..c1b98df 100644 (file)
@@ -126,7 +126,6 @@ typedef enum {
    /* end keywords */
        KW_HOST,
        KW_IKEPORT,
-       KW_NEXTHOP,
        KW_SUBNET,
        KW_SUBNETWITHIN,
        KW_PROTOPORT,
@@ -156,7 +155,6 @@ typedef enum {
    /* left end keywords */
        KW_LEFT,
        KW_LEFTIKEPORT,
-       KW_LEFTNEXTHOP,
        KW_LEFTSUBNET,
        KW_LEFTSUBNETWITHIN,
        KW_LEFTPROTOPORT,
@@ -185,7 +183,6 @@ typedef enum {
    /* right end keywords */
        KW_RIGHT,
        KW_RIGHTIKEPORT,
-       KW_RIGHTNEXTHOP,
        KW_RIGHTSUBNET,
        KW_RIGHTSUBNETWITHIN,
        KW_RIGHTPROTOPORT,
index d31fd24..9622177 100644 (file)
@@ -107,7 +107,6 @@ ocspuri2,          KW_OCSPURI2
 certuribase,       KW_CERTURIBASE
 left,              KW_LEFT
 leftikeport,       KW_LEFTIKEPORT
-leftnexthop,       KW_LEFTNEXTHOP
 leftsubnet,        KW_LEFTSUBNET
 leftsubnetwithin,  KW_LEFTSUBNETWITHIN
 leftprotoport,     KW_LEFTPROTOPORT
@@ -131,7 +130,6 @@ leftca2,           KW_LEFTCA2
 leftgroups,        KW_LEFTGROUPS
 right,             KW_RIGHT
 rightikeport,      KW_RIGHTIKEPORT
-rightnexthop,      KW_RIGHTNEXTHOP
 rightsubnet,       KW_RIGHTSUBNET
 rightsubnetwithin, KW_RIGHTSUBNETWITHIN
 rightprotoport,    KW_RIGHTPROTOPORT