X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/9c1869ccb199bce1b649cd7923e662f9a88e3488..959cce2660c25a7f9e248c969a5d9b013d6190d4:/l2tpns.c diff --git a/l2tpns.c b/l2tpns.c index 68817a2..ec224bd 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -3218,7 +3218,7 @@ void processudp(uint8_t *buf, int len, struct sockaddr_in *addr, uint16_t indexu // Set multilink options before sending initial LCP packet sess_local[s].mp_mrru = 1614; - sess_local[s].mp_epdis = ntohl(config->iftun_n_address[tunnel[t].indexudp] ? config->iftun_n_address[tunnel[t].indexudp] : my_address); + sess_local[s].mp_epdis = ntohl(config->iftun_address ? config->iftun_address : my_address); sendlcp(s, t); change_state(s, lcp, RequestSent); @@ -5456,7 +5456,7 @@ static void update_config() while (*shost && (shost < e)) { - while ((n < e) && (*n == ' ' || *n == '\t')) n++; + while ((n < e) && (*n == ' ' || *n == ',' || *n == '\t')) n++; i = 0; while (n < e && (*n != ',') && (*n != '\t')) @@ -5464,6 +5464,7 @@ static void update_config() config->multi_n_hostname[config->nbmultihostname][i] = *n; n++;i++; } + if (i > 0) { config->multi_n_hostname[config->nbmultihostname][i] = 0; @@ -5471,6 +5472,8 @@ static void update_config() config->nbmultihostname++; if (config->nbmultihostname >= MAX_NBHOSTNAME) break; } + + shost = n; } if (config->nbmultihostname >= 1)