pptpd: backport from trunk

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov
2015-11-18 21:49:25 +01:00
parent ee0bb7b9df
commit 70471762cc
9 changed files with 245 additions and 0 deletions
@@ -0,0 +1,18 @@
--- a/pqueue.c
+++ b/pqueue.c
@@ -7,13 +7,11 @@
#include "pqueue.h"
#ifdef DEBUG_PQUEUE
-#define DEBUG_ON 1
+#define DEBUG_CMD(_a) { _a }
#else
-#define DEBUG_ON 0
+#define DEBUG_CMD(_a)
#endif
-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a }
-
#define MIN_CAPACITY 128 /* min allocated buffer for a packet */
static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new);
+11
View File
@@ -0,0 +1,11 @@
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -18,7 +18,7 @@ all: $(PLUGINS)
%.so: %.c
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
+LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd
install: $(PLUGINS)
$(INSTALL) -d $(LIBDIR)
+11
View File
@@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -153,7 +153,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+CFLAGS = $(COPTS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
+38
View File
@@ -0,0 +1,38 @@
--- a/bcrelay.c
+++ b/bcrelay.c
@@ -667,7 +667,7 @@ static void mainloop(int argc, char **ar
* there is no need to concern about the physical/link layer header because it is
* filled in automatically (based on the contents of sa).
*/
- if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_TRYHARD, (struct sockaddr *)&sa, salen)) < 0)
+ if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_DONTROUTE, (struct sockaddr *)&sa, salen)) < 0)
{
if (errno == ENETDOWN) {
syslog(LOG_NOTICE, "ignored ENETDOWN from sendto(), a network interface was going down?");
--- a/compat.c
+++ b/compat.c
@@ -11,10 +11,10 @@
#include "compat.h"
#include "our_syslog.h"
-#ifndef HAVE_STRLCPY
#include <string.h>
#include <stdio.h>
+#ifndef HAVE_STRLCPY
void strlcpy(char *dst, const char *src, size_t size)
{
strncpy(dst, src, size - 1);
--- /dev/null
+++ b/net/ppp_defs.h
@@ -0,0 +1,10 @@
+#ifndef _NET_PPP_DEFS_H
+#define _NET_PPP_DEFS_H 1
+
+#define __need_time_t
+#include <time.h>
+
+#include <asm/types.h>
+#include <linux/ppp_defs.h>
+
+#endif /* net/ppp_defs.h */