Remove unused ipsec.conf left/rightnatip keyword
authorMartin Willi <martin@revosec.ch>
Tue, 21 Aug 2012 07:32:33 +0000 (09:32 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 21 Aug 2012 07:38:01 +0000 (09:38 +0200)
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 13ffec6..eb25b2a 100644 (file)
@@ -187,7 +187,6 @@ static const token_info_t token_info[] =
        { ARG_MISC, 0, NULL  /* KW_PROTOPORT */                                        },
        { ARG_STR,  offsetof(starter_end_t, sourceip), NULL                            },
        { ARG_STR,  offsetof(starter_end_t, dns), NULL                                 },
-       { ARG_MISC, 0, NULL  /* KW_NATIP */                                            },
        { ARG_ENUM, offsetof(starter_end_t, firewall), LST_bool                        },
        { ARG_ENUM, offsetof(starter_end_t, hostaccess), LST_bool                      },
        { ARG_ENUM, offsetof(starter_end_t, allow_any), LST_bool                       },
index 724dc78..aaba7b1 100644 (file)
@@ -26,7 +26,6 @@ static bool starter_cmp_end(starter_end_t *c1, starter_end_t *c2)
        if ((c1 == NULL) || (c2 == NULL))
                return FALSE;
 
-       VARCMP(has_natip);
        VARCMP(modecfg);
        VARCMP(port);
        VARCMP(protocol);
index 642fc55..9199fce 100644 (file)
@@ -231,11 +231,6 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token,
                end->host = strdupnull(value);
                break;
        case KW_SOURCEIP:
-               if (end->has_natip)
-               {
-                       DBG1(DBG_APP, "# natip and sourceip cannot be defined at the same time");
-                       goto err;
-               }
                if (value[0] == '%')
                {
                        if (streq(value, "%modeconfig") || streq(value, "%modecfg") ||
@@ -370,27 +365,6 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token,
                }
                break;
        }
-       case KW_NATIP:
-       {
-               host_t *host;
-               if (end->sourceip)
-               {
-                       DBG1(DBG_APP, "# natip and sourceip cannot be defined at the same time");
-                       goto err;
-               }
-               host = host_create_from_string(value, 0);
-               if (!host)
-               {
-                       DBG1(DBG_APP, "# bad addr: %s=%s", name, value);
-                       goto err;
-               }
-               host->destroy(host);
-               end->sourceip = strdupnull(value);
-               end->has_natip = TRUE;
-               conn->mode = MODE_TUNNEL;
-               conn->proxy_mode = FALSE;
-               break;
-       }
        default:
                break;
        }
index 55022ff..d01d9c1 100644 (file)
@@ -102,7 +102,6 @@ struct starter_end {
                char            *host;
                u_int           ikeport;
                char            *subnet;
-               bool            has_natip;
                bool            modecfg;
                certpolicy_t    sendcert;
                bool            firewall;
index 96609e1..537bceb 100644 (file)
@@ -98,7 +98,6 @@ typedef enum {
        KW_PROTOPORT,
        KW_SOURCEIP,
        KW_DNS,
-       KW_NATIP,
        KW_FIREWALL,
        KW_HOSTACCESS,
        KW_ALLOWANY,
@@ -128,7 +127,6 @@ typedef enum {
        KW_LEFTPROTOPORT,
        KW_LEFTSOURCEIP,
        KW_LEFTDNS,
-       KW_LEFTNATIP,
        KW_LEFTFIREWALL,
        KW_LEFTHOSTACCESS,
        KW_LEFTALLOWANY,
@@ -158,7 +156,6 @@ typedef enum {
        KW_RIGHTPROTOPORT,
        KW_RIGHTSOURCEIP,
        KW_RIGHTDNS,
-       KW_RIGHTNATIP,
        KW_RIGHTFIREWALL,
        KW_RIGHTHOSTACCESS,
        KW_RIGHTALLOWANY,
index f4d1f47..8366f52 100644 (file)
@@ -86,7 +86,6 @@ leftsubnetwithin,  KW_LEFTSUBNET
 leftprotoport,     KW_LEFTPROTOPORT
 leftsourceip,      KW_LEFTSOURCEIP
 leftdns,           KW_LEFTDNS
-leftnatip,         KW_LEFTNATIP
 leftfirewall,      KW_LEFTFIREWALL
 lefthostaccess,    KW_LEFTHOSTACCESS
 leftallowany,      KW_LEFTALLOWANY
@@ -111,7 +110,6 @@ rightsubnetwithin, KW_RIGHTSUBNET
 rightprotoport,    KW_RIGHTPROTOPORT
 rightsourceip,     KW_RIGHTSOURCEIP
 rightdns,          KW_RIGHTDNS
-rightnatip,        KW_RIGHTNATIP
 rightfirewall,     KW_RIGHTFIREWALL
 righthostaccess,   KW_RIGHTHOSTACCESS
 rightallowany,     KW_RIGHTALLOWANY