source: freewrt/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
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  
    1111DEFINES += -DETCDIR='"$(etcdir)"'
    1212
    1313OPTIM =
    14 OPTIM += -g
    1514OPTIM += -O3
    1615
    17 CC = gcc
    18 LD = gcc
    19 INCLUDES = -I.
     16INCLUDES = -I. -I$(STAGING_DIR)/usr/include
    2017CPPFLAGS = $(INCLUDES) $(DEFINES)
    2118CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
    22 LDFLAGS =
     19LDFLAGS = -L$(STAGING_DIR)/usr/lib
    2320LDLIBS =
    24 INSTALL = install -c -D -o root -g root
     21INSTALL = install -c -D
    2522
    2623l2tpns.LIBS = -lm -lcli -ldl
    2724
  • l2tpns-2.1.14/l2tpns.c

    diff -urN orig/l2tpns-2.1.14/l2tpns.c l2tpns-2.1.14/l2tpns.c
    old new  
    940940
    941941        if (!t)
    942942        {
    943                 static int backtrace_count = 0;
    944943                LOG(0, 0, t, "tunnelsend called with 0 as tunnel id\n");
    945944                STAT(tunnel_tx_errors);
    946                 log_backtrace(backtrace_count, 5)
    947945                return;
    948946        }
    949947
    950948        if (!tunnel[t].ip)
    951949        {
    952                 static int backtrace_count = 0;
    953950                LOG(1, 0, t, "Error sending data out tunnel: no remote endpoint (tunnel not set up)\n");
    954                 log_backtrace(backtrace_count, 5)
    955951                STAT(tunnel_tx_errors);
    956952                return;
    957953        }
     
    41254121                struct sched_param params = {0};
    41264122                params.sched_priority = 1;
    41274123
    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, &params)) == 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;
    41454126        }
    41464127
    41474128        /* 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  
    55#define __L2TPNS_H__
    66
    77#include <netinet/in.h>
    8 #include <execinfo.h>
    98#include <stdio.h>
    109#include <signal.h>
    1110#include <stdlib.h>
     
    766765extern ippoolt *ip_address_pool;
    767766#define sessionfree (session[0].next)
    768767
    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 
    784768
    785769extern configt *config;
    786770extern 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  
    17551755{
    17561756        if (size < 12) // Need more space than this!!
    17571757        {
    1758                 static int backtrace_count = 0;
    17591758                LOG(0, s, t, "makeppp buffer too small for L2TP header (size=%d)\n", size);
    1760                 log_backtrace(backtrace_count, 5)
    17611759                return NULL;
    17621760        }
    17631761
     
    17801778
    17811779        if (l + 12 > size)
    17821780        {
    1783                 static int backtrace_count = 0;
    17841781                LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, l + 12);
    1785                 log_backtrace(backtrace_count, 5)
    17861782                return NULL;
    17871783        }
    17881784
Note: See TracBrowser for help on using the repository browser.