Ticket #11058: xl2tpd-lns.patch

File xl2tpd-lns.patch, 779 bytes (added by Sergey Fionov <fionov@…>, 6 years ago)

pppol2tp.so parameters fix for LNS

  • xl2tpd.c

    diff --git a/xl2tpd.c b/xl2tpd.c
    index 3fb6dd7..9efbd69 100644
    a b int start_pppd (struct call *c, struct ppp_opts *opts) 
    421421       stropt[pos] = (char *) malloc (10); 
    422422       snprintf (stropt[pos], 10, "%d", fd2); 
    423423        pos++; 
     424       if (c->container->lns) { 
     425        stropt[pos++] = strdup ("pppol2tp_lns_mode"); 
     426        stropt[pos++] = strdup ("pppol2tp_tunnel_id"); 
     427        stropt[pos] = (char *) malloc (10); 
     428        snprintf (stropt[pos], 10, "%d", c->container->ourtid); 
     429            pos++; 
     430        stropt[pos++] = strdup ("pppol2tp_session_id"); 
     431        stropt[pos] = (char *) malloc (10); 
     432        snprintf (stropt[pos], 10, "%d", c->cid); 
     433            pos++; 
     434       } 
    424435        stropt[pos] = NULL; 
    425436    } 
    426437    else