diff -urN xl2tpd-1.2.0-orig/control.c xl2tpd-1.2.0/control.c
--- xl2tpd-1.2.0-orig/control.c	2010-12-22 11:24:31.000000000 +0800
+++ xl2tpd-1.2.0/control.c	2010-12-22 11:25:14.000000000 +0800
@@ -220,6 +220,7 @@
     int pppd_passwdfd[2];            
     int tmptid,tmpcid;
 	char unit[8];
+	char srv_buf[128];
 
     if (c->msgtype < 0)
     {
@@ -859,6 +860,9 @@
 		  IPADDY (t->peer.sin_addr), c->ourcid, c->cid,
 		  c->serno, t->refme, t->refhim);
         control_xmit (buf);
+		snprintf(srv_buf,sizeof(srv_buf),"uci -q -P /var/state/ set network.wan.l2tpsrv=%s",
+			IPADDY (t->peer.sin_addr));
+		system(srv_buf);
         po = NULL;
         po = add_opt (po, "passive");
         po = add_opt (po, "-detach");
