diff options
Diffstat (limited to 'src/starter/confread.c')
-rw-r--r-- | src/starter/confread.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/starter/confread.c b/src/starter/confread.c index 642fc551b..f30f2188c 100644 --- a/src/starter/confread.c +++ b/src/starter/confread.c @@ -231,64 +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") || - streq(value, "%config") || streq(value, "%cfg")) - { - /* request ip via config payload */ - free(end->sourceip); - end->sourceip = NULL; - end->sourceip_mask = 1; - } - else - { /* %poolname, strip %, serve ip requests */ - free(end->sourceip); - end->sourceip = strdupnull(value+1); - end->sourceip_mask = 0; - } - end->modecfg = TRUE; - } - else - { - host_t *host; - char *sep; - - sep = strchr(value, '/'); - if (sep) - { /* CIDR notation, address pool */ - *sep = '\0'; - host = host_create_from_string(value, 0); - if (!host) - { - DBG1(DBG_APP, "# bad subnet: %s=%s", name, value); - goto err; - } - host->destroy(host); - free(end->sourceip); - end->sourceip = strdupnull(value); - end->sourceip_mask = atoi(sep + 1); - /* restore the original text in case also= is used */ - *sep = '/'; - } - else - { /* fixed srcip */ - host = host_create_from_string(value, 0); - if (!host) - { - DBG1(DBG_APP, "# bad addr: %s=%s", name, value); - goto err; - } - end->sourceip_mask = (host->get_family(host) == AF_INET) ? - 32 : 128; - host->destroy(host); - } - } conn->mode = MODE_TUNNEL; conn->proxy_mode = FALSE; break; @@ -370,27 +312,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; } |