source:
freewrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch@
6fc4520e
| Last change on this file since 6fc4520e was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 3.5 KB | |
-
l2tpns-2.1.14/Makefile
diff -urN orig/l2tpns-2.1.14/Makefile l2tpns-2.1.14/Makefile
old new 11 11 DEFINES += -DETCDIR='"$(etcdir)"' 12 12 13 13 OPTIM = 14 OPTIM += -g15 14 OPTIM += -O3 16 15 17 CC = gcc 18 LD = gcc 19 INCLUDES = -I. 16 INCLUDES = -I. -I$(STAGING_DIR)/usr/include 20 17 CPPFLAGS = $(INCLUDES) $(DEFINES) 21 18 CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM) 22 LDFLAGS = 19 LDFLAGS = -L$(STAGING_DIR)/usr/lib 23 20 LDLIBS = 24 INSTALL = install -c -D -o root -g root21 INSTALL = install -c -D 25 22 26 23 l2tpns.LIBS = -lm -lcli -ldl 27 24 -
l2tpns-2.1.14/l2tpns.c
diff -urN orig/l2tpns-2.1.14/l2tpns.c l2tpns-2.1.14/l2tpns.c
old new 940 940 941 941 if (!t) 942 942 { 943 static int backtrace_count = 0;944 943 LOG(0, 0, t, "tunnelsend called with 0 as tunnel id\n"); 945 944 STAT(tunnel_tx_errors); 946 log_backtrace(backtrace_count, 5)947 945 return; 948 946 } 949 947 950 948 if (!tunnel[t].ip) 951 949 { 952 static int backtrace_count = 0;953 950 LOG(1, 0, t, "Error sending data out tunnel: no remote endpoint (tunnel not set up)\n"); 954 log_backtrace(backtrace_count, 5)955 951 STAT(tunnel_tx_errors); 956 952 return; 957 953 } … … 4125 4121 struct sched_param params = {0}; 4126 4122 params.sched_priority = 1; 4127 4123 4128 if (get_nprocs() < 2) 4129 { 4130 LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); 4131 config->scheduler_fifo = 0; 4132 } 4133 else 4134 { 4135 if ((ret = sched_setscheduler(0, SCHED_FIFO, ¶ms)) == 0) 4136 { 4137 LOG(1, 0, 0, "Using FIFO scheduler. Say goodbye to any other processes running\n"); 4138 } 4139 else 4140 { 4141 LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno)); 4142 config->scheduler_fifo = 0; 4143 } 4144 } 4124 LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n"); 4125 config->scheduler_fifo = 0; 4145 4126 } 4146 4127 4147 4128 /* Set up the cluster communications port. */ -
l2tpns-2.1.14/l2tpns.h
diff -urN orig/l2tpns-2.1.14/l2tpns.h l2tpns-2.1.14/l2tpns.h
old new 5 5 #define __L2TPNS_H__ 6 6 7 7 #include <netinet/in.h> 8 #include <execinfo.h>9 8 #include <stdio.h> 10 9 #include <signal.h> 11 10 #include <stdlib.h> … … 766 765 extern ippoolt *ip_address_pool; 767 766 #define sessionfree (session[0].next) 768 767 769 #define log_backtrace(count, max) \770 if (count++ < max) { \771 void *array[20]; \772 char **strings; \773 int size, i; \774 LOG(0, 0, t, "Backtrace follows:\n"); \775 size = backtrace(array, 10); \776 strings = backtrace_symbols(array, size); \777 if (strings) for (i = 0; i < size; i++) \778 { \779 LOG(0, 0, t, " %s\n", strings[i]); \780 } \781 free(strings); \782 }783 784 768 785 769 extern configt *config; 786 770 extern time_t basetime; // Time when this process started. -
l2tpns-2.1.14/ppp.c
diff -urN orig/l2tpns-2.1.14/ppp.c l2tpns-2.1.14/ppp.c
old new 1755 1755 { 1756 1756 if (size < 12) // Need more space than this!! 1757 1757 { 1758 static int backtrace_count = 0;1759 1758 LOG(0, s, t, "makeppp buffer too small for L2TP header (size=%d)\n", size); 1760 log_backtrace(backtrace_count, 5)1761 1759 return NULL; 1762 1760 } 1763 1761 … … 1780 1778 1781 1779 if (l + 12 > size) 1782 1780 { 1783 static int backtrace_count = 0;1784 1781 LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, l + 12); 1785 log_backtrace(backtrace_count, 5)1786 1782 return NULL; 1787 1783 } 1788 1784
Note:
See TracBrowser
for help on using the repository browser.
