From 21a192bf3f47b9f07620fb8101dd1fceb123ee5c Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Mon, 27 Feb 2012 22:59:47 -0500 Subject: [PATCH] Added systemd files and patch for xl2tpd --- tmpfiles-xl2tpd.conf | 1 + xl2tpd-1.3.1-Wunused.patch | 41 ++++++++++++++++++++++++++++++++++++++ xl2tpd.service | 13 ++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 tmpfiles-xl2tpd.conf create mode 100644 xl2tpd-1.3.1-Wunused.patch create mode 100644 xl2tpd.service diff --git a/tmpfiles-xl2tpd.conf b/tmpfiles-xl2tpd.conf new file mode 100644 index 0000000..66bc6f8 --- /dev/null +++ b/tmpfiles-xl2tpd.conf @@ -0,0 +1 @@ +D /var/run/xl2tpd 0755 root root - diff --git a/xl2tpd-1.3.1-Wunused.patch b/xl2tpd-1.3.1-Wunused.patch new file mode 100644 index 0000000..67e7cd8 --- /dev/null +++ b/xl2tpd-1.3.1-Wunused.patch @@ -0,0 +1,41 @@ +diff --git a/control.c b/control.c +index 0892df9..a124d04 100644 +--- a/control.c ++++ b/control.c +@@ -1685,7 +1685,6 @@ void handle_special (struct buffer *buf, struct call *c, _u16 call) + * call if it was a CDN, otherwise, send a CDN to notify them + * that this call has been terminated. + */ +- struct buffer *outgoing; + struct tunnel *t = c->container; + /* Don't do anything unless it's a control packet */ + if (!CTBIT (*((_u16 *) buf->start))) +@@ -1705,7 +1704,6 @@ void handle_special (struct buffer *buf, struct call *c, _u16 call) + return; + } + /* Make a packet with the specified call number */ +- outgoing = new_outgoing (t); + /* FIXME: If I'm not a CDN, I need to send a CDN */ + control_zlb (buf, t, c); + c->cid = 0; +diff --git a/network.c b/network.c +index 783a181..82aedd7 100644 +--- a/network.c ++++ b/network.c +@@ -377,7 +377,7 @@ void network_thread () + * our network socket. Control handling is no longer done here. + */ + struct sockaddr_in from, to; +- unsigned int fromlen, tolen; ++ unsigned int fromlen; + int tunnel, call; /* Tunnel and call */ + int recvsize; /* Length of data received */ + struct buffer *buf; /* Payload buffer */ +@@ -443,7 +443,6 @@ void network_thread () + memset(&to, 0, sizeof(to)); + + fromlen = sizeof(from); +- tolen = sizeof(to); + + memset(&msgh, 0, sizeof(struct msghdr)); + iov.iov_base = buf->start; diff --git a/xl2tpd.service b/xl2tpd.service new file mode 100644 index 0000000..b17a447 --- /dev/null +++ b/xl2tpd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Level 2 Tunnel Protocol Daemon (L2TP) +After=syslog.target network.target +After=openswan.service +Wants=openswan.service + +[Service] +Type=simple +PIDFile=/var/run/xl2tpd/xl2tpd.pid +ExecStart=/usr/sbin/xl2tpd -D + +[Install] +WantedBy=multi-user.target