summaryrefslogtreecommitdiff
path: root/openwrt/package/l2tpd
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2006-04-07 00:00:41 +0000
committerNicolas Thill <nico@openwrt.org>2006-04-07 00:00:41 +0000
commit520aae40c8c9c020745ae37db81c7264900d4170 (patch)
treeae79fac447ac6c3f1d9105effd63b04a31c1c30c /openwrt/package/l2tpd
parentab9e191898c7ad88ccf5146fa409d14c346486c8 (diff)
downloadmtk-20170518-520aae40c8c9c020745ae37db81c7264900d4170.zip
mtk-20170518-520aae40c8c9c020745ae37db81c7264900d4170.tar.gz
mtk-20170518-520aae40c8c9c020745ae37db81c7264900d4170.tar.bz2
Fix l2tpd blocking on read from ppp childs (closes: #455)
SVN-Revision: 3597
Diffstat (limited to 'openwrt/package/l2tpd')
-rw-r--r--openwrt/package/l2tpd/Makefile2
-rw-r--r--openwrt/package/l2tpd/patches/04-nonblock.patch26
2 files changed, 27 insertions, 1 deletions
diff --git a/openwrt/package/l2tpd/Makefile b/openwrt/package/l2tpd/Makefile
index 0af0c09..fa1a0f9 100644
--- a/openwrt/package/l2tpd/Makefile
+++ b/openwrt/package/l2tpd/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=l2tpd
PKG_VERSION:=0.70pre
PKG_UPSTREAM_VERSION:=0.70-pre20031121
-PKG_RELEASE:=2.1
+PKG_RELEASE:=3.1
PKG_MD5SUM:=3f2707b6e16a8cb72e7bf64f574202fa
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/l2tpd
diff --git a/openwrt/package/l2tpd/patches/04-nonblock.patch b/openwrt/package/l2tpd/patches/04-nonblock.patch
new file mode 100644
index 0000000..7fc2226
--- /dev/null
+++ b/openwrt/package/l2tpd/patches/04-nonblock.patch
@@ -0,0 +1,26 @@
+--- l2tpd-0.70-pre20031121.orig/l2tpd.c.orig 2006-04-05 13:28:36.000000000 +0100
++++ l2tpd-0.70-pre20031121.orig/l2tpd.c 2006-04-05 13:33:39.000000000 +0100
+@@ -289,6 +289,8 @@
+ #endif
+ struct termios ptyconf;
+ char *str;
++ int flags;
++
+ p = opts;
+ stropt[0] = strdup (PPPD);
+ while (p)
+@@ -347,6 +349,14 @@
+ close(c->fd);
+ return -EINVAL;
+ }
++ flags = fcntl(c->fd, F_GETFL);
++ if (flags < 0 || fcntl(c->fd, F_SETFL, flags | O_NONBLOCK) < 0)
++ {
++ log (LOG_WARN, "%s: unable to fcntl(O_NONBLOCK) on pty\n",
++ __FUNCTION__);
++ close(c->fd);
++ return -EINVAL;
++ }
+ tty = ptsname(c->fd);
+ if (tty == NULL)
+ {