Root/package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch

1pppd: Fix creation of linkpidfile
2
3When pppd is run without "nodetach" or with "updetach", the linkpidfile is
4never created. The call to create_linkpidfile() is protected by a check for
5linkpidfile[0] but this is only filled in when create_linkpidfile() is called.
6
7This patch changes to code to allways uncondiationally call
8create_linkpidfile(), it originated from the Debian project.
9
10Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
11
12--- a/pppd/main.c
13+++ b/pppd/main.c
14@@ -773,8 +773,7 @@ detach()
15     /* update pid files if they have been written already */
16     if (pidfilename[0])
17         create_pidfile(pid);
18- if (linkpidfile[0])
19- create_linkpidfile(pid);
20+ create_linkpidfile(pid);
21     exit(0); /* parent dies */
22     }
23     setsid();
24

Archive Download this file



interactive