{"action":"created","issue":{"url":"https://api.github.com/repos/openwrt/packages/issues/1334","labels_url":"https://api.github.com/repos/openwrt/packages/issues/1334/labels{/name}","comments_url":"https://api.github.com/repos/openwrt/packages/issues/1334/comments","events_url":"https://api.github.com/repos/openwrt/packages/issues/1334/events","html_url":"https://github.com/openwrt/packages/issues/1334","id":83463847,"number":1334,"title":"xl2tp client fails to reconnect","user":{"login":"duvi","id":4281443,"avatar_url":"https://avatars.githubusercontent.com/u/4281443?v=3","gravatar_id":"","url":"https://api.github.com/users/duvi","html_url":"https://github.com/duvi","followers_url":"https://api.github.com/users/duvi/followers","following_url":"https://api.github.com/users/duvi/following{/other_user}","gists_url":"https://api.github.com/users/duvi/gists{/gist_id}","starred_url":"https://api.github.com/users/duvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duvi/subscriptions","organizations_url":"https://api.github.com/users/duvi/orgs","repos_url":"https://api.github.com/users/duvi/repos","events_url":"https://api.github.com/users/duvi/events{/privacy}","received_events_url":"https://api.github.com/users/duvi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-06-01T12:16:12Z","updated_at":"2015-06-29T11:49:44Z","closed_at":null,"body":"Using the latest version of the package.\r\n\r\nI'm running an l2tp over ipsec client on an Openwrt box.\r\n\r\nBy default, it's connecting fine after a reboot. However, every now and then, when the l2tp client wants to reconnect, it can't.\r\n\r\nlogread shows forever:\r\n```\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\nMon Jun  1 13:57:07 2015 daemon.warn xl2tpd[16255]: Y: Host name lookup failed for wqĐwqĐ. Trying to look again in 0 seconds.\r\n```\r\n```\r\nroot@OpenWrt:~# cat /etc/config/network\r\nconfig 'interface' 'vma'\r\n        option 'proto'    'l2tp'\r\n        option 'server'   'myserver'\r\n        option 'username' 'myusername'\r\n        option 'password' 'mypassword'\r\n        option 'mtu'      '1410'\r\n        option 'keepalive' '12'\r\n        option 'defaultroute' '0'\r\n```\r\n```\r\nroot@OpenWrt:~# ifstatus vma\r\n{\r\n        \"up\": false,\r\n        \"pending\": true,\r\n        \"available\": true,\r\n        \"autostart\": true,\r\n        \"proto\": \"l2tp\",\r\n        \"data\": {\r\n\r\n        }\r\n}\r\n```\r\n```\r\nroot@OpenWrt:~# ps\r\n16255 root       896 S    xl2tpd -D -l -p /var/run/xl2tpd.pid\r\n29463 root      1448 S    {l2tp.sh} /bin/sh ./l2tp.sh l2tp setup vma {\"proto\":\"l2tp\",\"defaultroute\":false,\"server\":\"myserver\",\"username\":\"myusername\",\"password\":\"mypassword\",\"mtu\":1410,\"keepalive\":\"12\",\"mtu\":1410}\r\n29472 root       784 S    xl2tpd-control add l2tp-vma pppoptfile=/tmp/l2tp/options.vma lns=myserver redial=yes redial timeout=20\r\n```\r\n\"ifdown vma\" or \"ifup vma\" has no effect either.\r\n\r\nThere's clearly something wrong with xl2tp, as I've no idea what \"Y\" and \"wqĐwqĐ\" mean in the log.\r\nMaybe some bad pointer or memory corruption?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openwrt/packages/issues/comments/116625847","html_url":"https://github.com/openwrt/packages/issues/1334#issuecomment-116625847","issue_url":"https://api.github.com/repos/openwrt/packages/issues/1334","id":116625847,"user":{"login":"yousong","id":4948057,"avatar_url":"https://avatars.githubusercontent.com/u/4948057?v=3","gravatar_id":"","url":"https://api.github.com/users/yousong","html_url":"https://github.com/yousong","followers_url":"https://api.github.com/users/yousong/followers","following_url":"https://api.github.com/users/yousong/following{/other_user}","gists_url":"https://api.github.com/users/yousong/gists{/gist_id}","starred_url":"https://api.github.com/users/yousong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yousong/subscriptions","organizations_url":"https://api.github.com/users/yousong/orgs","repos_url":"https://api.github.com/users/yousong/repos","events_url":"https://api.github.com/users/yousong/events{/privacy}","received_events_url":"https://api.github.com/users/yousong/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T11:49:44Z","updated_at":"2015-06-29T11:49:44Z","body":"Hi, Daniel\r\n\r\nI am currently using OpenWrt BB with backported netifd and xl2tpd (`redial=yes` bit included, and no IPSec).  I tried both `ifconfig eth1 down` and `ifdown wan` and later brought up the wan network, l2tp interface came up just fine.\r\n\r\n`ppp_generic_teardown` is a nop in the case of xl2tpd as there is now `no_proto_task` for it in netifd.\r\n\r\nWith xl2tpd, netifd will only retry when l3_device of the interface goes down.  After netifd has done its part (teardown and setup), it depends on xl2tpd to redial on and on until the l3_device goes up again.  So my guess is that the failed test case from @puleglot can be resolved by adding back `redial=yes redial timeout=20` to the xl2tpd-control add command.\r\n\r\nCheers."}}