diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-05-15 15:10:23 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-06-11 17:33:31 +0200 |
commit | eca839b0a7646839f00a7a8ad1531b288e98788b (patch) | |
tree | e064a6623c859c59e75639052b6c826c84cdaef0 /src/starter | |
parent | 6ce841b2133ab41d08f2fde1825d0a6581d8b47f (diff) | |
download | strongswan-eca839b0a7646839f00a7a8ad1531b288e98788b.tar.bz2 strongswan-eca839b0a7646839f00a7a8ad1531b288e98788b.tar.xz |
starter: No special handling for left|rightsubnet, just pass it on as string.
Diffstat (limited to 'src/starter')
-rw-r--r-- | src/starter/cmp.c | 3 | ||||
-rw-r--r-- | src/starter/confread.c | 32 | ||||
-rw-r--r-- | src/starter/confread.h | 3 | ||||
-rw-r--r-- | src/starter/starterstroke.c | 2 |
4 files changed, 1 insertions, 39 deletions
diff --git a/src/starter/cmp.c b/src/starter/cmp.c index 6713a9186..68890b18a 100644 --- a/src/starter/cmp.c +++ b/src/starter/cmp.c @@ -35,10 +35,8 @@ starter_cmp_end(starter_end_t *c1, starter_end_t *c2) return FALSE; VARCMP(ikeport); - VARCMP(has_client); VARCMP(has_port_wildcard); VARCMP(has_natip); - VARCMP(has_virt); VARCMP(modecfg); VARCMP(port); VARCMP(protocol); @@ -53,7 +51,6 @@ starter_cmp_conn(starter_conn_t *c1, starter_conn_t *c2) return FALSE; VARCMP(policy); - VARCMP(tunnel_addr_family); VARCMP(mark_in.value); VARCMP(mark_in.mask); VARCMP(mark_out.value); diff --git a/src/starter/confread.c b/src/starter/confread.c index 8f34e1e75..b401aa744 100644 --- a/src/starter/confread.c +++ b/src/starter/confread.c @@ -31,8 +31,6 @@ #include "args.h" #include "files.h" -/* strings containing a colon are interpreted as an IPv6 address */ -#define ip_version(string) (strchr(string, '.') ? AF_INET : AF_INET6) static const char ike_defaults[] = "aes128-sha1-modp2048,3des-sha1-modp1536"; static const char esp_defaults[] = "aes128-sha1-modp2048,3des-sha1-modp1536"; @@ -93,7 +91,6 @@ static void default_values(starter_config_t *cfg) cfg->conn_default.sa_rekey_margin = SA_REPLACEMENT_MARGIN_DEFAULT; cfg->conn_default.sa_rekey_fuzz = SA_REPLACEMENT_FUZZ_DEFAULT; cfg->conn_default.sa_keying_tries = SA_REPLACEMENT_RETRIES_DEFAULT; - cfg->conn_default.tunnel_addr_family = AF_INET; cfg->conn_default.install_policy = TRUE; cfg->conn_default.dpd_delay = 30; /* seconds */ cfg->conn_default.dpd_timeout = 150; /* seconds */ @@ -184,35 +181,6 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token, free(end->host); end->host = strdupnull(value); break; - case KW_SUBNET: - if ((strlen(value) >= 6 && strncmp(value,"vhost:",6) == 0) - || (strlen(value) >= 5 && strncmp(value,"vnet:",5) == 0)) - { - /* used by pluto only */ - end->has_virt = TRUE; - } - else - { - ip_subnet net; - char *pos; - int len = 0; - - end->has_client = TRUE; - conn->tunnel_addr_family = ip_version(value); - - pos = strchr(value, ','); - if (pos) - { - len = pos - value; - } - ugh = ttosubnet(value, len, ip_version(value), &net); - if (ugh != NULL) - { - DBG1(DBG_APP, "# bad subnet: %s=%s [%s]", name, value, ugh); - goto err; - } - } - break; case KW_SOURCEIP: if (end->has_natip) { diff --git a/src/starter/confread.h b/src/starter/confread.h index 7fa27cc18..04a8e36bb 100644 --- a/src/starter/confread.h +++ b/src/starter/confread.h @@ -73,10 +73,8 @@ struct starter_end { char *host; u_int ikeport; char *subnet; - bool has_client; bool has_port_wildcard; bool has_natip; - bool has_virt; bool modecfg; certpolicy_t sendcert; bool firewall; @@ -129,7 +127,6 @@ struct starter_conn { mark_t mark_in; mark_t mark_out; u_int32_t tfc; - sa_family_t tunnel_addr_family; bool install_policy; bool aggressive; starter_end_t left, right; diff --git a/src/starter/starterstroke.c b/src/starter/starterstroke.c index e39581ca7..34cfca0ed 100644 --- a/src/starter/starterstroke.c +++ b/src/starter/starterstroke.c @@ -145,7 +145,7 @@ static void starter_stroke_add_end(stroke_msg_t *msg, stroke_end_t *msg_end, sta msg_end->sourceip_mask = conn_end->sourceip_mask; msg_end->sendcert = conn_end->sendcert; msg_end->hostaccess = conn_end->hostaccess; - msg_end->tohost = !conn_end->has_client; + msg_end->tohost = !conn_end->subnet; msg_end->allow_any = conn_end->allow_any; msg_end->protocol = conn_end->protocol; msg_end->port = conn_end->port; |