mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 02:55:55 +02:00
Cleanup: Removed unused lfs-files and patches
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
== List of softwares used to build IPFire Version: 2.3 ==
|
||||
== List of softwares used to build IPFire Version: 2.3-beta1 ==
|
||||
* Archive-Tar-1.29
|
||||
* Archive-Zip-1.16
|
||||
* BerkeleyDB-0.27
|
||||
|
||||
92
lfs/dm9601
92
lfs/dm9601
@@ -1,92 +0,0 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 2.6
|
||||
|
||||
THISAPP = dm9601-$(VER)
|
||||
DL_FILE = $(THISAPP).tgz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
ifeq "$(SMP)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-smp
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
endif
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = e041c02477d8e19d79ae07d168ab3f73
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/dm9601-make+ids.patch
|
||||
ifeq "$(SMP)" "1"
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && make -C /lib/modules/$(KVER)-ipfire-smp/build/ SUBDIRS=$(DIR_APP) modules
|
||||
cd $(DIR_APP) && install -m 644 dm9601.ko /lib/modules/$(KVER)-ipfire-smp/kernel/drivers/usb/net
|
||||
else
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && make -C /lib/modules/$(KVER)-ipfire/build/ SUBDIRS=$(DIR_APP) modules
|
||||
cd $(DIR_APP) && install -m 644 dm9601.ko /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/net
|
||||
endif
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
92
lfs/mcs7830
92
lfs/mcs7830
@@ -1,92 +0,0 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 060926
|
||||
|
||||
THISAPP = mcs7830-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.bz2
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
ifeq "$(SMP)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-smp
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
endif
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = 234b18d71a55ee70b06c87fc4e7516a1
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
|
||||
|
||||
ifeq "$(SMP)" "1"
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && make -C /lib/modules/$(KVER)-ipfire-smp/build/ SUBDIRS=$(DIR_APP) modules
|
||||
cd $(DIR_APP) && install -m 644 mcs7830.ko /lib/modules/$(KVER)-ipfire-smp/kernel/drivers/usb/net
|
||||
else
|
||||
cd $(DIR_APP) && make clean
|
||||
cd $(DIR_APP) && make -C /lib/modules/$(KVER)-ipfire/build/ SUBDIRS=$(DIR_APP) modules
|
||||
cd $(DIR_APP) && install -m 644 mcs7830.ko /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/net
|
||||
endif
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
@@ -1,28 +0,0 @@
|
||||
Submitted By: Dan Nicholson <dnicholson_at_linuxfromscratch_dot_org>
|
||||
Date: 2006-04-25
|
||||
Initial Package Version: 2.1.21
|
||||
Upstream Status: Applied
|
||||
Origin: Upstream CVS
|
||||
$ cvs log cmulocal/openldap.m4
|
||||
...
|
||||
RCS file: /cvs/src/cmulocal/openldap.m4,v
|
||||
Working file: cmulocal/openldap.m4
|
||||
...
|
||||
----------------------------
|
||||
revision 1.2
|
||||
date: 2006/03/13 19:16:11; author: mel; state: Exp; lines: +3 -1
|
||||
Allow for OpenLDAP 2.3+
|
||||
Description: Allow OpenLDAP => 2.3
|
||||
|
||||
diff -pur cyrus-sasl-2.1.21.orig/configure cyrus-sasl-2.1.21/configure
|
||||
--- cyrus-sasl-2.1.21.orig/configure 2006-03-30 14:24:55.000000000 +0000
|
||||
+++ cyrus-sasl-2.1.21/configure 2006-03-30 21:00:35.388580365 +0000
|
||||
@@ -12253,6 +12253,8 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
char *__openldap_compat = "2.1.27 or better okay";
|
||||
#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
|
||||
char *__openldap_compat = "2.2.6 or better okay";
|
||||
+#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2
|
||||
+char *__openldap_compat = "2.3 or better okay"
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
@@ -1,44 +0,0 @@
|
||||
Submitted By: Dan Nicholson <dnicholson_at_linuxfromscratch_dot_org>
|
||||
Date: 2006-04-25
|
||||
Initial Package Version: 2.1.21
|
||||
Upstream Status: Applied
|
||||
Origin: Upstream CVS
|
||||
http://asg.web.cmu.edu/archive/message.php?mailbox=org.acs.asg.project.sasl.commits&msg=1519
|
||||
http://asg.web.cmu.edu/archive/message.php?mailbox=org.acs.asg.project.sasl.commits&msg=1578
|
||||
Description: Adds needed headers for plugins when compiled with OpenSSL-0.9.8
|
||||
|
||||
diff -pNur cyrus-sasl-2.1.21.orig/plugins/ntlm.c cyrus-sasl-2.1.21/plugins/ntlm.c
|
||||
--- cyrus-sasl-2.1.21.orig/plugins/ntlm.c 2004-12-24 16:06:14.000000000 +0000
|
||||
+++ cyrus-sasl-2.1.21/plugins/ntlm.c 2006-04-25 18:46:24.433487794 +0000
|
||||
@@ -74,6 +74,7 @@
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include <openssl/md4.h>
|
||||
+#include <openssl/md5.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/des.h>
|
||||
#include <openssl/opensslv.h>
|
||||
diff -pNur cyrus-sasl-2.1.21.orig/plugins/passdss.c cyrus-sasl-2.1.21/plugins/passdss.c
|
||||
--- cyrus-sasl-2.1.21.orig/plugins/passdss.c 2004-11-27 16:17:43.000000000 +0000
|
||||
+++ cyrus-sasl-2.1.21/plugins/passdss.c 2006-04-25 18:46:36.131787252 +0000
|
||||
@@ -67,6 +67,9 @@
|
||||
/* for digest and cipher support */
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
+#include <openssl/md5.h>
|
||||
+#include <openssl/sha.h>
|
||||
+#include <openssl/dsa.h>
|
||||
|
||||
#include <sasl.h>
|
||||
#define MD5_H /* suppress internal MD5 */
|
||||
diff -pNur cyrus-sasl-2.1.21.orig/plugins/srp.c cyrus-sasl-2.1.21/plugins/srp.c
|
||||
--- cyrus-sasl-2.1.21.orig/plugins/srp.c 2004-06-23 18:43:37.000000000 +0000
|
||||
+++ cyrus-sasl-2.1.21/plugins/srp.c 2006-04-25 18:46:36.135785645 +0000
|
||||
@@ -87,6 +87,7 @@ typedef unsigned short uint32;
|
||||
/* for digest and cipher support */
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
+#include <openssl/md5.h>
|
||||
|
||||
#include <sasl.h>
|
||||
#define MD5_H /* suppress internal MD5 */
|
||||
@@ -1,77 +0,0 @@
|
||||
diff -Naur dm9601-2.6.org/dm9601.h dm9601-2.6/dm9601.h
|
||||
--- dm9601-2.6.org/dm9601.h 2006-11-24 10:06:02.000000000 +0100
|
||||
+++ dm9601-2.6/dm9601.h 2008-04-04 09:54:06.000000000 +0200
|
||||
@@ -162,6 +162,8 @@
|
||||
DEFAULT_GPIO_RESET )
|
||||
DM9601_DEV( "Davicom USB-100", 0x3334, 0x1701,
|
||||
DEFAULT_GPIO_RESET )
|
||||
+DM9601_DEV( "ShanTou ST268 USB", 0x0a46, 0x0268,
|
||||
+ DEFAULT_GPIO_RESET )
|
||||
DM9601_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
|
||||
DEFAULT_GPIO_RESET )
|
||||
DM9601_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
|
||||
diff -Naur dm9601-2.6.org/Makefile dm9601-2.6/Makefile
|
||||
--- dm9601-2.6.org/Makefile 2006-11-24 10:06:04.000000000 +0100
|
||||
+++ dm9601-2.6/Makefile 2008-04-03 22:34:04.000000000 +0200
|
||||
@@ -1,51 +1,17 @@
|
||||
-##================================================================
|
||||
-## Davicom Semiconductor Inc. For DM9601 V0.00
|
||||
-## --------------------------------------------------------
|
||||
-## Description:
|
||||
-## Compile driver dm9601.c to dm9601.o
|
||||
-##
|
||||
-## Modification List:
|
||||
-## 09/05/2000 Fixed SMPFALGS wrong on smp & smp_mod
|
||||
-## 08/02/2000 Changed some description string & include file path
|
||||
-## 07/25/2000 Append smp_mod and changed some descriptions
|
||||
-## 01/25/2000 by Sten Wang
|
||||
-##================================================================
|
||||
-# Comment/uncomment the following line to disable/enable debugging
|
||||
-#DEBUG = y
|
||||
+obj-m := dm9601.o
|
||||
|
||||
-# Add your debugging flag (or not) to CFLAGS
|
||||
-ifeq ($(DEBUG),y)
|
||||
- DEBFLAGS = -O -g # "-O" is needed to expand inlines
|
||||
-else
|
||||
- DEBFLAGS = -O2
|
||||
-endif
|
||||
-
|
||||
-CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
|
||||
-
|
||||
-ifneq ($(KERNELRELEASE),)
|
||||
-# call from kernel build system
|
||||
-
|
||||
-obj-m := dm9601.o
|
||||
-
|
||||
-else
|
||||
-
|
||||
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
||||
-PWD := $(shell pwd)
|
||||
+KDIR := /lib/modules/$(shell uname -r)/build
|
||||
+PWD := $(shell pwd)
|
||||
|
||||
default:
|
||||
- $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINCDIR=$(PWD)/../include modules
|
||||
-
|
||||
-endif
|
||||
-
|
||||
-
|
||||
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules;
|
||||
+install:
|
||||
+ insmod dm9601.ko
|
||||
+remove:
|
||||
+ rmmod dm9601
|
||||
|
||||
clean:
|
||||
- rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
|
||||
-
|
||||
-depend .depend dep:
|
||||
- $(CC) $(CFLAGS) -M *.c > .depend
|
||||
+ rm -rf .tmp_versions Modules.symvers *.mod.c *.o *.ko .*.cmd
|
||||
|
||||
+
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
@@ -1,37 +0,0 @@
|
||||
*** orgdriver/ide/pci/via82cxxx.c Thu May 3 21:49:52 2007
|
||||
--- drivers/ide/pci/via82cxxx.c Thu May 10 11:51:49 2007
|
||||
***************
|
||||
*** 67,72 ****
|
||||
--- 67,76 ----
|
||||
#define VIA_NO_UNMASK 0x080 /* Doesn't work with IRQ unmasking on */
|
||||
#define VIA_BAD_ID 0x100 /* Has wrong vendor ID (0x1107) */
|
||||
#define VIA_BAD_AST 0x200 /* Don't touch Address Setup Timing */
|
||||
+ #define PCI_DEVICE_ID_VIA_VT8251 0x3287
|
||||
+ #define PCI_DEVICE_ID_VIA_VT8237A 0x3337
|
||||
+ #define PCI_DEVICE_ID_VIA_CX700 0x8324
|
||||
+ #define PCI_DEVICE_ID_VIA_CX700_IDE 0x5324
|
||||
|
||||
/*
|
||||
* VIA SouthBridge chips.
|
||||
***************
|
||||
*** 79,84 ****
|
||||
--- 83,91 ----
|
||||
u8 rev_max;
|
||||
u16 flags;
|
||||
} via_isa_bridges[] = {
|
||||
+ { "vt8251", PCI_DEVICE_ID_VIA_VT8251 , 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
+ { "vt8237a", PCI_DEVICE_ID_VIA_VT8237A , 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
+ { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
***************
|
||||
*** 498,503 ****
|
||||
--- 505,511 ----
|
||||
static struct pci_device_id via_pci_tbl[] = {
|
||||
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
+ { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CX700_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0,0},
|
||||
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
|
||||
{ 0, },
|
||||
};
|
||||
@@ -1,190 +0,0 @@
|
||||
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
|
||||
Date: 2006-01-12
|
||||
Initial Package Version: 0.4.9-pre1
|
||||
Upstream Status: Applied in upstream CVS
|
||||
Origin: MPlayer-1.0pre7try2 version of FFmpeg (upstream CVS)
|
||||
Description: Fixes building with AMR code
|
||||
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/Makefile ffmpeg-0.4.9-pre1/libavcodec/Makefile
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/Makefile 2004-06-18 13:11:15.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/Makefile 2006-01-12 18:27:33.000000000 +0000
|
||||
@@ -7,7 +7,7 @@
|
||||
VPATH=$(SRC_PATH)/libavcodec
|
||||
|
||||
# NOTE: -I.. is needed to include config.h
|
||||
-CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
|
||||
+CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS)
|
||||
|
||||
OBJS= common.o utils.o mem.o allcodecs.o \
|
||||
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
|
||||
@@ -22,14 +22,16 @@
|
||||
smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o qtrle.o g726.o \
|
||||
flac.o vp3dsp.o integer.o
|
||||
|
||||
+AMROBJS=
|
||||
ifeq ($(AMR_NB),yes)
|
||||
ifeq ($(AMR_NB_FIXED),yes)
|
||||
-OBJS+= amr.o
|
||||
+AMROBJS= amr.o
|
||||
AMREXTRALIBS+= amr/*.o
|
||||
AMRLIBS=amrlibs
|
||||
CLEANAMR=cleanamr
|
||||
else
|
||||
-OBJS+= amr.o amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o
|
||||
+AMROBJS= amr.o
|
||||
+OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o
|
||||
CLEANAMR=cleanamrfloat
|
||||
endif
|
||||
endif
|
||||
@@ -43,13 +45,15 @@
|
||||
endif
|
||||
|
||||
ifeq ($(AMR_WB),yes)
|
||||
-OBJS+= amr.o amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o \
|
||||
+AMROBJS= amr.o
|
||||
+OBJS+= amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o \
|
||||
amrwb_float/dec_if.o amrwb_float/dec_lpc.o amrwb_float/dec_main.o \
|
||||
amrwb_float/dec_rom.o amrwb_float/dec_util.o amrwb_float/enc_acelp.o \
|
||||
amrwb_float/enc_dtx.o amrwb_float/enc_gain.o amrwb_float/enc_if.o \
|
||||
amrwb_float/enc_lpc.o amrwb_float/enc_main.o amrwb_float/enc_rom.o \
|
||||
amrwb_float/enc_util.o amrwb_float/if_rom.o
|
||||
endif
|
||||
+OBJS+= $(AMROBJS)
|
||||
CLEANAMRWB=cleanamrwbfloat
|
||||
ASM_OBJS=
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/amr.c ffmpeg-0.4.9-pre1/libavcodec/amr.c
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/amr.c 2004-05-21 14:37:16.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/amr.c 2006-01-12 18:27:33.000000000 +0000
|
||||
@@ -411,27 +411,32 @@
|
||||
AMRContext *s = (AMRContext*)avctx->priv_data;
|
||||
|
||||
uint8_t*amrData=buf;
|
||||
- int offset=0;
|
||||
static short block_size[16]={ 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 };
|
||||
enum Mode dec_mode;
|
||||
int packet_size;
|
||||
|
||||
- //printf("amr_decode_frame data_size=%i buf=0x%X buf_size=%d frameCount=%d!!\n",*data_size,buf,buf_size,s->frameCount);
|
||||
+ /* av_log(NULL,AV_LOG_DEBUG,"amr_decode_frame buf=%p buf_size=%d frameCount=%d!!\n",buf,buf_size,s->frameCount); */
|
||||
+
|
||||
+ if(buf_size==0) {
|
||||
+ /* nothing to do */
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
- while(offset<buf_size)
|
||||
- {
|
||||
- dec_mode = (amrData[offset] >> 3) & 0x000F;
|
||||
- packet_size = block_size[dec_mode];
|
||||
+ dec_mode = (buf[0] >> 3) & 0x000F;
|
||||
+ packet_size = block_size[dec_mode]+1;
|
||||
+
|
||||
+ if(packet_size > buf_size) {
|
||||
+ av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n", buf_size, packet_size);
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
- s->frameCount++;
|
||||
- //printf("offset=%d, packet_size=%d amrData= 0x%X %X %X %X\n",offset,packet_size,amrData[offset],amrData[offset+1],amrData[offset+2],amrData[offset+3]);
|
||||
- /* call decoder */
|
||||
- Decoder_Interface_Decode(s->decState, &amrData[offset], data+*data_size, 0);
|
||||
- *data_size+=160*2;
|
||||
+ s->frameCount++;
|
||||
+ /* av_log(NULL,AV_LOG_DEBUG,"packet_size=%d amrData= 0x%X %X %X %X\n",packet_size,amrData[0],amrData[1],amrData[2],amrData[3]); */
|
||||
+ /* call decoder */
|
||||
+ Decoder_Interface_Decode(s->decState, amrData, data, 0);
|
||||
+ *data_size=160*2;
|
||||
|
||||
- offset+=packet_size+1;
|
||||
- }
|
||||
- return buf_size;
|
||||
+ return packet_size;
|
||||
}
|
||||
|
||||
static int amr_nb_encode_frame(AVCodecContext *avctx,
|
||||
@@ -445,6 +450,7 @@
|
||||
data,
|
||||
frame,
|
||||
0);
|
||||
+ /* av_log(NULL,AV_LOG_DEBUG,"amr_nb_encode_frame encoded %u bytes, bitrate %u, first byte was %#02x\n",written, s->enc_bitrate, frame[0] ); */
|
||||
|
||||
return written;
|
||||
}
|
||||
@@ -598,20 +604,26 @@
|
||||
AMRWBContext *s = (AMRWBContext*)avctx->priv_data;
|
||||
|
||||
uint8_t*amrData=buf;
|
||||
- int offset=0;
|
||||
int mode;
|
||||
int packet_size;
|
||||
|
||||
- while(offset<buf_size)
|
||||
- {
|
||||
- s->frameCount++;
|
||||
- mode = (Word16)((amrData[offset] >> 3) & 0x0F);
|
||||
- packet_size = block_size[mode];
|
||||
- D_IF_decode( s->state, &amrData[offset], data+*data_size, _good_frame);
|
||||
- *data_size+=320*2;
|
||||
- offset+=packet_size;
|
||||
+ if(buf_size==0) {
|
||||
+ /* nothing to do */
|
||||
+ return 0;
|
||||
}
|
||||
- return buf_size;
|
||||
+
|
||||
+ mode = (amrData[0] >> 3) & 0x000F;
|
||||
+ packet_size = block_size[mode];
|
||||
+
|
||||
+ if(packet_size > buf_size) {
|
||||
+ av_log(avctx, AV_LOG_ERROR, "amr frame too short (%u, should be %u)\n", buf_size, packet_size+1);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ s->frameCount++;
|
||||
+ D_IF_decode( s->state, amrData, data, _good_frame);
|
||||
+ *data_size=320*2;
|
||||
+ return packet_size;
|
||||
}
|
||||
|
||||
static int amr_wb_decode_close(AVCodecContext * avctx)
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h ffmpeg-0.4.9-pre1/libavcodec/avcodec.h
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h 2004-07-09 12:49:55.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/avcodec.h 2006-01-12 18:27:33.000000000 +0000
|
||||
@@ -124,7 +124,7 @@
|
||||
CODEC_ID_ADPCM_G726,
|
||||
|
||||
/* AMR */
|
||||
- CODEC_ID_AMR_NB,
|
||||
+ CODEC_ID_AMR_NB= 0x12000,
|
||||
CODEC_ID_AMR_WB,
|
||||
|
||||
/* RealAudio codecs*/
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavformat/Makefile ffmpeg-0.4.9-pre1/libavformat/Makefile
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavformat/Makefile 2004-04-24 15:16:23.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavformat/Makefile 2006-01-12 18:27:33.000000000 +0000
|
||||
@@ -23,15 +23,17 @@
|
||||
OBJS+= asf-enc.o
|
||||
endif
|
||||
|
||||
+AMROBJS=
|
||||
ifeq ($(AMR_NB),yes)
|
||||
-OBJS+= amr.o
|
||||
+AMROBJS= amr.o
|
||||
endif
|
||||
ifeq ($(AMR_NB_FIXED),yes)
|
||||
-OBJS+= amr.o
|
||||
+AMROBJS= amr.o
|
||||
endif
|
||||
ifeq ($(AMR_WB),yes)
|
||||
-OBJS+= amr.o
|
||||
+AMROBJS= amr.o
|
||||
endif
|
||||
+OBJS+= $(AMROBJS)
|
||||
|
||||
# image formats
|
||||
OBJS+= pnm.o yuv.o png.o jpeg.o gifdec.o sgi.o
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
|
||||
Date: 2005-09-07
|
||||
Initial Package Version: 0.4.9-pre1
|
||||
Upstream Status: Some fixes unknown, the MMX fix is from upstream CVS
|
||||
Origin: Frugalware Linux (frugalware.org)
|
||||
http://frugalware.org/pipermail/frugalware-darcs/2005-August/003296.html
|
||||
Also the MMX fix is from upstream CVS
|
||||
http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/i386/dsputil_mmx.c.diff?r1=1.88&r2=1.89&cvsroot=FFMpeg
|
||||
Description: Fixes GCC-4.0.1 build problems
|
||||
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h ffmpeg-0.4.9-pre1/libavcodec/ac3.h
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/ac3.h 2003-03-06 11:32:04.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/ac3.h 2005-09-07 18:50:35.000000000 +0000
|
||||
@@ -43,6 +43,7 @@
|
||||
int cplfleak, cplsleak;
|
||||
} AC3BitAllocParameters;
|
||||
|
||||
+#if 0
|
||||
extern const uint16_t ac3_freqs[3];
|
||||
extern const uint16_t ac3_bitratetab[19];
|
||||
extern const int16_t ac3_window[256];
|
||||
@@ -52,6 +53,7 @@
|
||||
extern const uint16_t dbkneetab[4];
|
||||
extern const uint16_t floortab[8];
|
||||
extern const uint16_t fgaintab[8];
|
||||
+#endif
|
||||
|
||||
void ac3_common_init(void);
|
||||
void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h ffmpeg-0.4.9-pre1/libavcodec/avcodec.h
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/avcodec.h 2004-07-09 12:49:55.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/avcodec.h 2005-09-07 18:49:40.000000000 +0000
|
||||
@@ -1657,6 +1657,14 @@
|
||||
#define FF_OPT_MAX_DEPTH 10
|
||||
} AVOption;
|
||||
|
||||
+struct AVOption;
|
||||
+#ifdef HAVE_MMX
|
||||
+extern const struct AVOption avoptions_common[3 + 5];
|
||||
+#else
|
||||
+extern const struct AVOption avoptions_common[3];
|
||||
+#endif
|
||||
+extern const struct AVOption avoptions_workaround_bug[11];
|
||||
+
|
||||
/**
|
||||
* Parse option(s) and sets fields in passed structure
|
||||
* @param strct structure where the parsed results will be written
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/common.h ffmpeg-0.4.9-pre1/libavcodec/common.h
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/common.h 2004-07-01 12:33:07.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/common.h 2005-09-07 18:49:40.000000000 +0000
|
||||
@@ -62,14 +62,6 @@
|
||||
#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
|
||||
#define AVOPTION_END() AVOPTION_SUB(NULL)
|
||||
|
||||
-struct AVOption;
|
||||
-#ifdef HAVE_MMX
|
||||
-extern const struct AVOption avoptions_common[3 + 5];
|
||||
-#else
|
||||
-extern const struct AVOption avoptions_common[3];
|
||||
-#endif
|
||||
-extern const struct AVOption avoptions_workaround_bug[11];
|
||||
-
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
/* Suppress restrict if it was not defined in config.h. */
|
||||
|
||||
diff -Naur ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c
|
||||
--- ffmpeg-0.4.9-pre1-orig/libavcodec/i386/dsputil_mmx.c 2004-06-08 02:13:44.000000000 +0000
|
||||
+++ ffmpeg-0.4.9-pre1/libavcodec/i386/dsputil_mmx.c 2005-09-07 18:54:04.000000000 +0000
|
||||
@@ -644,26 +644,22 @@
|
||||
"punpcklwd %%mm0, %%mm1 \n\t"
|
||||
"punpckhwd %%mm4, %%mm3 \n\t"
|
||||
"punpckhwd %%mm0, %%mm6 \n\t"
|
||||
- "movd %%mm5, %0 \n\t"
|
||||
- "punpckhdq %%mm5, %%mm5 \n\t"
|
||||
- "movd %%mm5, %1 \n\t"
|
||||
- "movd %%mm3, %2 \n\t"
|
||||
- "punpckhdq %%mm3, %%mm3 \n\t"
|
||||
- "movd %%mm3, %3 \n\t"
|
||||
- "movd %%mm1, %4 \n\t"
|
||||
- "punpckhdq %%mm1, %%mm1 \n\t"
|
||||
- "movd %%mm1, %5 \n\t"
|
||||
- "movd %%mm6, %6 \n\t"
|
||||
- "punpckhdq %%mm6, %%mm6 \n\t"
|
||||
- "movd %%mm6, %7 \n\t"
|
||||
- : "=m" (*(uint32_t*)(src + 0*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 1*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 2*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 3*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 4*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 5*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 6*stride)),
|
||||
- "=m" (*(uint32_t*)(src + 7*stride))
|
||||
+ "movd %%mm5, (%0) \n\t"
|
||||
+ "punpckhdq %%mm5, %%mm5 \n\t"
|
||||
+ "movd %%mm5, (%0,%2) \n\t"
|
||||
+ "movd %%mm3, (%0,%2,2) \n\t"
|
||||
+ "punpckhdq %%mm3, %%mm3 \n\t"
|
||||
+ "movd %%mm3, (%0,%3) \n\t"
|
||||
+ "movd %%mm1, (%1) \n\t"
|
||||
+ "punpckhdq %%mm1, %%mm1 \n\t"
|
||||
+ "movd %%mm1, (%1,%2) \n\t"
|
||||
+ "movd %%mm6, (%1,%2,2) \n\t"
|
||||
+ "punpckhdq %%mm6, %%mm6 \n\t"
|
||||
+ "movd %%mm6, (%1,%3) \n\t"
|
||||
+ :: "r" (src),
|
||||
+ "r" (src + 4*stride),
|
||||
+ "r" ((long) stride ),
|
||||
+ "r" ((long)(3*stride))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
--- libavcodec/libpostproc/postprocess_template.orig.c 2005-05-04 00:13:55.809595776 -0400
|
||||
+++ libavcodec/libpostproc/postprocess_template.c 2005-05-04 00:17:44.090891744 -0400
|
||||
@@ -2646,7 +2646,7 @@
|
||||
* accurate deblock filter
|
||||
*/
|
||||
static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){
|
||||
- int64_t dc_mask, eq_mask;
|
||||
+ int64_t dc_mask, eq_mask, both_masks;
|
||||
int64_t sums[10*8*2];
|
||||
src+= step*3; // src points to begin of the 8x8 Block
|
||||
//START_TIMER
|
||||
@@ -2755,7 +2755,9 @@
|
||||
: "%eax"
|
||||
);
|
||||
|
||||
- if(dc_mask & eq_mask){
|
||||
+ both_masks = dc_mask & eq_mask;
|
||||
+
|
||||
+ if (both_masks){
|
||||
int offset= -8*step;
|
||||
int64_t *temp_sums= sums;
|
||||
|
||||
@@ -2930,7 +2932,7 @@
|
||||
" js 1b \n\t"
|
||||
|
||||
: "+r"(offset), "+r"(temp_sums)
|
||||
- : "r" (step), "r"(src - offset), "m"(dc_mask & eq_mask)
|
||||
+ : "r" (step), "r"(src - offset), "m"(both_masks)
|
||||
);
|
||||
}else
|
||||
src+= step; // src points to begin of the 8x8 Block
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -ruw ipac-ng-1.31_iptables-1.3.1/agents/iptables/iptables.c ipac-ng-1.31/agents/iptables/iptables.c
|
||||
--- ipac-ng-1.31_iptables-1.3.1/agents/iptables/iptables.c 2005-05-02 12:00:48.000000000 +0200
|
||||
+++ ipac-ng-1.31/agents/iptables/iptables.c 2005-05-11 22:15:59.558139120 +0200
|
||||
@@ -1144,6 +1144,7 @@
|
||||
rule = new_rule();
|
||||
|
||||
chain = new_rule();
|
||||
+ chain->pkts = 1;
|
||||
|
||||
strncpy(rule->name, cp+1, MAX_RULE_NAME_LENGTH);
|
||||
strncpy(chain->name, nextline->line, cp-nextline->line);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,885 +0,0 @@
|
||||
diff -Nru linux-2.6.16/drivers/net/Kconfig linux-2.6.16-imq/drivers/net/Kconfig
|
||||
--- linux-2.6.16/drivers/net/Kconfig 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/drivers/net/Kconfig 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -93,6 +93,129 @@
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called eql. If unsure, say N.
|
||||
|
||||
+config IMQ
|
||||
+ tristate "IMQ (intermediate queueing device) support"
|
||||
+ depends on NETDEVICES && NETFILTER
|
||||
+ ---help---
|
||||
+ The IMQ device(s) is used as placeholder for QoS queueing disciplines.
|
||||
+ Every packet entering/leaving the IP stack can be directed through
|
||||
+ the IMQ device where it's enqueued/dequeued to the attached qdisc.
|
||||
+ This allows you to treat network devices as classes and distribute
|
||||
+ bandwidth among them. Iptables is used to specify through which IMQ
|
||||
+ device, if any, packets travel.
|
||||
+
|
||||
+ More information at: http://www.linuximq.net/
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module
|
||||
+ will be called imq. If unsure, say N.
|
||||
+
|
||||
+choice
|
||||
+ prompt "IMQ behavior (PRE/POSTROUTING)"
|
||||
+ depends on IMQ
|
||||
+ default IMQ_BEHAVIOR_BA
|
||||
+ help
|
||||
+
|
||||
+ This settings defines how IMQ behaves in respect to its
|
||||
+ hooking in PREROUTING and POSTROUTING.
|
||||
+
|
||||
+ IMQ can work in any of the following ways:
|
||||
+
|
||||
+ PREROUTING | POSTROUTING
|
||||
+ -----------------|-------------------
|
||||
+ #1 After NAT | After NAT
|
||||
+ #2 After NAT | Before NAT
|
||||
+ #3 Before NAT | After NAT
|
||||
+ #4 Before NAT | Before NAT
|
||||
+
|
||||
+ The default behavior is to hook before NAT on PREROUTING
|
||||
+ and after NAT on POSTROUTING (#3).
|
||||
+
|
||||
+ This settings are specially usefull when trying to use IMQ
|
||||
+ to shape NATed clients.
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
+config IMQ_BEHAVIOR_AA
|
||||
+ bool "IMQ AA"
|
||||
+ help
|
||||
+ This settings defines how IMQ behaves in respect to its
|
||||
+ hooking in PREROUTING and POSTROUTING.
|
||||
+
|
||||
+ Choosing this option will make IMQ hook like this:
|
||||
+
|
||||
+ PREROUTING: After NAT
|
||||
+ POSTROUTING: After NAT
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
+config IMQ_BEHAVIOR_AB
|
||||
+ bool "IMQ AB"
|
||||
+ help
|
||||
+ This settings defines how IMQ behaves in respect to its
|
||||
+ hooking in PREROUTING and POSTROUTING.
|
||||
+
|
||||
+ Choosing this option will make IMQ hook like this:
|
||||
+
|
||||
+ PREROUTING: After NAT
|
||||
+ POSTROUTING: Before NAT
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
+config IMQ_BEHAVIOR_BA
|
||||
+ bool "IMQ BA"
|
||||
+ help
|
||||
+ This settings defines how IMQ behaves in respect to its
|
||||
+ hooking in PREROUTING and POSTROUTING.
|
||||
+
|
||||
+ Choosing this option will make IMQ hook like this:
|
||||
+
|
||||
+ PREROUTING: Before NAT
|
||||
+ POSTROUTING: After NAT
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
+config IMQ_BEHAVIOR_BB
|
||||
+ bool "IMQ BB"
|
||||
+ help
|
||||
+ This settings defines how IMQ behaves in respect to its
|
||||
+ hooking in PREROUTING and POSTROUTING.
|
||||
+
|
||||
+ Choosing this option will make IMQ hook like this:
|
||||
+
|
||||
+ PREROUTING: Before NAT
|
||||
+ POSTROUTING: Before NAT
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
+endchoice
|
||||
+
|
||||
+config IMQ_NUM_DEVS
|
||||
+
|
||||
+ int "Number of IMQ devices"
|
||||
+ range 2 8
|
||||
+ depends on IMQ
|
||||
+ default "2"
|
||||
+ help
|
||||
+
|
||||
+ This settings defines how many IMQ devices will be
|
||||
+ created.
|
||||
+
|
||||
+ The default value is 2.
|
||||
+
|
||||
+ More information can be found at: www.linuximq.net
|
||||
+
|
||||
+ If not sure leave the default settings alone.
|
||||
+
|
||||
config TUN
|
||||
tristate "Universal TUN/TAP device driver support"
|
||||
select CRC32
|
||||
diff -Nru linux-2.6.16/drivers/net/Makefile linux-2.6.16-imq/drivers/net/Makefile
|
||||
--- linux-2.6.16/drivers/net/Makefile 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/drivers/net/Makefile 2006-03-25 21:04:53.000000000 +0000
|
||||
@@ -125,6 +125,7 @@
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_DUMMY) += dummy.o
|
||||
+obj-$(CONFIG_IMQ) += imq.o
|
||||
obj-$(CONFIG_IFB) += ifb.o
|
||||
obj-$(CONFIG_DE600) += de600.o
|
||||
obj-$(CONFIG_DE620) += de620.o
|
||||
diff -Nru linux-2.6.16/drivers/net/imq.c linux-2.6.16-imq/drivers/net/imq.c
|
||||
--- linux-2.6.16/drivers/net/imq.c 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/drivers/net/imq.c 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,403 @@
|
||||
+/*
|
||||
+ * Pseudo-driver for the intermediate queue device.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * Authors: Patrick McHardy, <kaber@trash.net>
|
||||
+ *
|
||||
+ * The first version was written by Martin Devera, <devik@cdi.cz>
|
||||
+ *
|
||||
+ * Credits: Jan Rafaj <imq2t@cedric.vabo.cz>
|
||||
+ * - Update patch to 2.4.21
|
||||
+ * Sebastian Strollo <sstrollo@nortelnetworks.com>
|
||||
+ * - Fix "Dead-loop on netdevice imq"-issue
|
||||
+ * Marcel Sebek <sebek64@post.cz>
|
||||
+ * - Update to 2.6.2-rc1
|
||||
+ *
|
||||
+ * After some time of inactivity there is a group taking care
|
||||
+ * of IMQ again: http://www.linuximq.net
|
||||
+ *
|
||||
+ *
|
||||
+ * 2004/06/30 - New version of IMQ patch to kernels <=2.6.7 including
|
||||
+ * the following changes:
|
||||
+ *
|
||||
+ * - Correction of ipv6 support "+"s issue (Hasso Tepper)
|
||||
+ * - Correction of imq_init_devs() issue that resulted in
|
||||
+ * kernel OOPS unloading IMQ as module (Norbert Buchmuller)
|
||||
+ * - Addition of functionality to choose number of IMQ devices
|
||||
+ * during kernel config (Andre Correa)
|
||||
+ * - Addition of functionality to choose how IMQ hooks on
|
||||
+ * PRE and POSTROUTING (after or before NAT) (Andre Correa)
|
||||
+ * - Cosmetic corrections (Norbert Buchmuller) (Andre Correa)
|
||||
+ *
|
||||
+ *
|
||||
+ * 2005/12/16 - IMQ versions between 2.6.7 and 2.6.13 were
|
||||
+ * released with almost no problems. 2.6.14-x was released
|
||||
+ * with some important changes: nfcache was removed; After
|
||||
+ * some weeks of trouble we figured out that some IMQ fields
|
||||
+ * in skb were missing in skbuff.c - skb_clone and copy_skb_header.
|
||||
+ * These functions are correctly patched by this new patch version.
|
||||
+ *
|
||||
+ * Thanks for all who helped to figure out all the problems with
|
||||
+ * 2.6.14.x: Patrick McHardy, Rune Kock, VeNoMouS, Max CtRiX,
|
||||
+ * Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
|
||||
+ * I didn't forget anybody). I apologize again for my lack of time.
|
||||
+ *
|
||||
+ * More info at: http://www.linuximq.net/ (Andre Correa)
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
+#include <linux/skbuff.h>
|
||||
+#include <linux/netdevice.h>
|
||||
+#include <linux/rtnetlink.h>
|
||||
+#include <linux/if_arp.h>
|
||||
+#include <linux/netfilter.h>
|
||||
+#include <linux/netfilter_ipv4.h>
|
||||
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
+ #include <linux/netfilter_ipv6.h>
|
||||
+#endif
|
||||
+#include <linux/imq.h>
|
||||
+#include <net/pkt_sched.h>
|
||||
+
|
||||
+static nf_hookfn imq_nf_hook;
|
||||
+
|
||||
+static struct nf_hook_ops imq_ingress_ipv4 = {
|
||||
+ .hook = imq_nf_hook,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .pf = PF_INET,
|
||||
+ .hooknum = NF_IP_PRE_ROUTING,
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
|
||||
+ .priority = NF_IP_PRI_MANGLE + 1
|
||||
+#else
|
||||
+ .priority = NF_IP_PRI_NAT_DST + 1
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+static struct nf_hook_ops imq_egress_ipv4 = {
|
||||
+ .hook = imq_nf_hook,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .pf = PF_INET,
|
||||
+ .hooknum = NF_IP_POST_ROUTING,
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_AA) || defined(CONFIG_IMQ_BEHAVIOR_BA)
|
||||
+ .priority = NF_IP_PRI_LAST
|
||||
+#else
|
||||
+ .priority = NF_IP_PRI_NAT_SRC - 1
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
+static struct nf_hook_ops imq_ingress_ipv6 = {
|
||||
+ .hook = imq_nf_hook,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .pf = PF_INET6,
|
||||
+ .hooknum = NF_IP6_PRE_ROUTING,
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
|
||||
+ .priority = NF_IP6_PRI_MANGLE + 1
|
||||
+#else
|
||||
+ .priority = NF_IP6_PRI_NAT_DST + 1
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+static struct nf_hook_ops imq_egress_ipv6 = {
|
||||
+ .hook = imq_nf_hook,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .pf = PF_INET6,
|
||||
+ .hooknum = NF_IP6_POST_ROUTING,
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_AA) || defined(CONFIG_IMQ_BEHAVIOR_BA)
|
||||
+ .priority = NF_IP6_PRI_LAST
|
||||
+#else
|
||||
+ .priority = NF_IP6_PRI_NAT_SRC - 1
|
||||
+#endif
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_IMQ_NUM_DEVS)
|
||||
+static unsigned int numdevs = CONFIG_IMQ_NUM_DEVS;
|
||||
+#else
|
||||
+static unsigned int numdevs = 2;
|
||||
+#endif
|
||||
+
|
||||
+static struct net_device *imq_devs;
|
||||
+
|
||||
+static struct net_device_stats *imq_get_stats(struct net_device *dev)
|
||||
+{
|
||||
+ return (struct net_device_stats *)dev->priv;
|
||||
+}
|
||||
+
|
||||
+/* called for packets kfree'd in qdiscs at places other than enqueue */
|
||||
+static void imq_skb_destructor(struct sk_buff *skb)
|
||||
+{
|
||||
+ struct nf_info *info = skb->nf_info;
|
||||
+
|
||||
+ if (info) {
|
||||
+ if (info->indev)
|
||||
+ dev_put(info->indev);
|
||||
+ if (info->outdev)
|
||||
+ dev_put(info->outdev);
|
||||
+ kfree(info);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
+{
|
||||
+ struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
|
||||
+
|
||||
+ stats->tx_bytes += skb->len;
|
||||
+ stats->tx_packets++;
|
||||
+
|
||||
+ skb->imq_flags = 0;
|
||||
+ skb->destructor = NULL;
|
||||
+
|
||||
+ dev->trans_start = jiffies;
|
||||
+ nf_reinject(skb, skb->nf_info, NF_ACCEPT);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info, unsigned queue_num, void *data)
|
||||
+{
|
||||
+ struct net_device *dev;
|
||||
+ struct net_device_stats *stats;
|
||||
+ struct sk_buff *skb2 = NULL;
|
||||
+ struct Qdisc *q;
|
||||
+ unsigned int index = skb->imq_flags&IMQ_F_IFMASK;
|
||||
+ int ret = -1;
|
||||
+
|
||||
+ if (index > numdevs)
|
||||
+ return -1;
|
||||
+
|
||||
+ dev = imq_devs + index;
|
||||
+ if (!(dev->flags & IFF_UP)) {
|
||||
+ skb->imq_flags = 0;
|
||||
+ nf_reinject(skb, info, NF_ACCEPT);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ dev->last_rx = jiffies;
|
||||
+
|
||||
+ if (skb->destructor) {
|
||||
+ skb2 = skb;
|
||||
+ skb = skb_clone(skb, GFP_ATOMIC);
|
||||
+ if (!skb)
|
||||
+ return -1;
|
||||
+ }
|
||||
+ skb->nf_info = info;
|
||||
+
|
||||
+ stats = (struct net_device_stats *)dev->priv;
|
||||
+ stats->rx_bytes+= skb->len;
|
||||
+ stats->rx_packets++;
|
||||
+
|
||||
+ spin_lock_bh(&dev->queue_lock);
|
||||
+ q = dev->qdisc;
|
||||
+ if (q->enqueue) {
|
||||
+ q->enqueue(skb_get(skb), q);
|
||||
+ if (skb_shared(skb)) {
|
||||
+ skb->destructor = imq_skb_destructor;
|
||||
+ kfree_skb(skb);
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ if (spin_is_locked(&dev->xmit_lock))
|
||||
+ netif_schedule(dev);
|
||||
+ else
|
||||
+
|
||||
+ while (!netif_queue_stopped(dev) &&
|
||||
+ qdisc_restart(dev)<0)
|
||||
+ /* NOTHING */;
|
||||
+
|
||||
+ spin_unlock_bh(&dev->queue_lock);
|
||||
+
|
||||
+ if (skb2)
|
||||
+ kfree_skb(ret ? skb : skb2);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct nf_queue_handler nfqh = {
|
||||
+ .name = "imq",
|
||||
+ .outfn = imq_nf_queue,
|
||||
+};
|
||||
+
|
||||
+static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff **pskb,
|
||||
+ const struct net_device *indev,
|
||||
+ const struct net_device *outdev,
|
||||
+ int (*okfn)(struct sk_buff *))
|
||||
+{
|
||||
+ if ((*pskb)->imq_flags & IMQ_F_ENQUEUE)
|
||||
+ return NF_QUEUE;
|
||||
+
|
||||
+ return NF_ACCEPT;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int __init imq_init_hooks(void)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ err = nf_register_queue_handler(PF_INET, &nfqh);
|
||||
+ if (err > 0)
|
||||
+ goto err1;
|
||||
+ if ((err = nf_register_hook(&imq_ingress_ipv4)))
|
||||
+ goto err2;
|
||||
+ if ((err = nf_register_hook(&imq_egress_ipv4)))
|
||||
+ goto err3;
|
||||
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
+ if ((err = nf_register_queue_handler(PF_INET6, &nfqh)))
|
||||
+ goto err4;
|
||||
+ if ((err = nf_register_hook(&imq_ingress_ipv6)))
|
||||
+ goto err5;
|
||||
+ if ((err = nf_register_hook(&imq_egress_ipv6)))
|
||||
+ goto err6;
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
+err6:
|
||||
+ nf_unregister_hook(&imq_ingress_ipv6);
|
||||
+err5:
|
||||
+ nf_unregister_queue_handler(PF_INET6);
|
||||
+err4:
|
||||
+ nf_unregister_hook(&imq_egress_ipv6);
|
||||
+#endif
|
||||
+err3:
|
||||
+ nf_unregister_hook(&imq_ingress_ipv4);
|
||||
+err2:
|
||||
+ nf_unregister_queue_handler(PF_INET);
|
||||
+err1:
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static void __exit imq_unhook(void)
|
||||
+{
|
||||
+ nf_unregister_hook(&imq_ingress_ipv4);
|
||||
+ nf_unregister_hook(&imq_egress_ipv4);
|
||||
+ nf_unregister_queue_handler(PF_INET);
|
||||
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
+ nf_unregister_hook(&imq_ingress_ipv6);
|
||||
+ nf_unregister_hook(&imq_egress_ipv6);
|
||||
+ nf_unregister_queue_handler(PF_INET6);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static int __init imq_dev_init(struct net_device *dev)
|
||||
+{
|
||||
+ dev->hard_start_xmit = imq_dev_xmit;
|
||||
+ dev->type = ARPHRD_VOID;
|
||||
+ dev->mtu = 1500;
|
||||
+ dev->tx_queue_len = 30;
|
||||
+ dev->flags = IFF_NOARP;
|
||||
+ dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL);
|
||||
+ if (dev->priv == NULL)
|
||||
+ return -ENOMEM;
|
||||
+ memset(dev->priv, 0, sizeof(struct net_device_stats));
|
||||
+ dev->get_stats = imq_get_stats;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void imq_dev_uninit(struct net_device *dev)
|
||||
+{
|
||||
+ kfree(dev->priv);
|
||||
+}
|
||||
+
|
||||
+static int __init imq_init_devs(void)
|
||||
+{
|
||||
+ struct net_device *dev;
|
||||
+ int i,j;
|
||||
+ j = numdevs;
|
||||
+
|
||||
+ if (!numdevs || numdevs > IMQ_MAX_DEVS) {
|
||||
+ printk(KERN_ERR "IMQ: numdevs has to be betweed 1 and %u\n",
|
||||
+ IMQ_MAX_DEVS);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ imq_devs = kmalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL);
|
||||
+ if (!imq_devs)
|
||||
+ return -ENOMEM;
|
||||
+ memset(imq_devs, 0, sizeof(struct net_device) * numdevs);
|
||||
+
|
||||
+ /* we start counting at zero */
|
||||
+ numdevs--;
|
||||
+
|
||||
+ for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
|
||||
+ SET_MODULE_OWNER(dev);
|
||||
+ strcpy(dev->name, "imq%d");
|
||||
+ dev->init = imq_dev_init;
|
||||
+ dev->uninit = imq_dev_uninit;
|
||||
+
|
||||
+ if (register_netdev(dev) < 0)
|
||||
+ goto err_register;
|
||||
+ }
|
||||
+ printk(KERN_INFO "IMQ starting with %u devices...\n", j);
|
||||
+ return 0;
|
||||
+
|
||||
+err_register:
|
||||
+ for (; i; i--)
|
||||
+ unregister_netdev(--dev);
|
||||
+ kfree(imq_devs);
|
||||
+ return -EIO;
|
||||
+}
|
||||
+
|
||||
+static void imq_cleanup_devs(void)
|
||||
+{
|
||||
+ int i;
|
||||
+ struct net_device *dev = imq_devs;
|
||||
+
|
||||
+ for (i = 0; i <= numdevs; i++)
|
||||
+ unregister_netdev(dev++);
|
||||
+
|
||||
+ kfree(imq_devs);
|
||||
+}
|
||||
+
|
||||
+static int __init imq_init_module(void)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ if ((err = imq_init_devs())) {
|
||||
+ printk(KERN_ERR "IMQ: Error trying imq_init_devs()\n");
|
||||
+ return err;
|
||||
+ }
|
||||
+ if ((err = imq_init_hooks())) {
|
||||
+ printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n");
|
||||
+ imq_cleanup_devs();
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ printk(KERN_INFO "IMQ driver loaded successfully.\n");
|
||||
+
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
|
||||
+ printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n");
|
||||
+#else
|
||||
+ printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n");
|
||||
+#endif
|
||||
+#if defined(CONFIG_IMQ_BEHAVIOR_AB) || defined(CONFIG_IMQ_BEHAVIOR_BB)
|
||||
+ printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n");
|
||||
+#else
|
||||
+ printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n");
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit imq_cleanup_module(void)
|
||||
+{
|
||||
+ imq_unhook();
|
||||
+ imq_cleanup_devs();
|
||||
+ printk(KERN_INFO "IMQ driver unloaded successfully.\n");
|
||||
+}
|
||||
+
|
||||
+
|
||||
+module_init(imq_init_module);
|
||||
+module_exit(imq_cleanup_module);
|
||||
+
|
||||
+module_param(numdevs, int, 0);
|
||||
+MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will be created)");
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nru linux-2.6.16/include/linux/imq.h linux-2.6.16-imq/include/linux/imq.h
|
||||
--- linux-2.6.16/include/linux/imq.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/include/linux/imq.h 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,9 @@
|
||||
+#ifndef _IMQ_H
|
||||
+#define _IMQ_H
|
||||
+
|
||||
+#define IMQ_MAX_DEVS 16
|
||||
+
|
||||
+#define IMQ_F_IFMASK 0x7f
|
||||
+#define IMQ_F_ENQUEUE 0x80
|
||||
+
|
||||
+#endif /* _IMQ_H */
|
||||
diff -Nru linux-2.6.16/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.16-imq/include/linux/netfilter_ipv4/ipt_IMQ.h
|
||||
--- linux-2.6.16/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/include/linux/netfilter_ipv4/ipt_IMQ.h 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _IPT_IMQ_H
|
||||
+#define _IPT_IMQ_H
|
||||
+
|
||||
+struct ipt_imq_info {
|
||||
+ unsigned int todev; /* target imq device */
|
||||
+};
|
||||
+
|
||||
+#endif /* _IPT_IMQ_H */
|
||||
diff -Nru linux-2.6.16/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.16-imq/include/linux/netfilter_ipv6/ip6t_IMQ.h
|
||||
--- linux-2.6.16/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/include/linux/netfilter_ipv6/ip6t_IMQ.h 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _IP6T_IMQ_H
|
||||
+#define _IP6T_IMQ_H
|
||||
+
|
||||
+struct ip6t_imq_info {
|
||||
+ unsigned int todev; /* target imq device */
|
||||
+};
|
||||
+
|
||||
+#endif /* _IP6T_IMQ_H */
|
||||
diff -Nru linux-2.6.16/include/linux/skbuff.h linux-2.6.16-imq/include/linux/skbuff.h
|
||||
--- linux-2.6.16/include/linux/skbuff.h 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/include/linux/skbuff.h 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -275,6 +275,10 @@
|
||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
struct sk_buff *nfct_reasm;
|
||||
#endif
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+ unsigned char imq_flags;
|
||||
+ struct nf_info *nf_info;
|
||||
+#endif
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
struct nf_bridge_info *nf_bridge;
|
||||
#endif
|
||||
diff -Nru linux-2.6.16/net/core/skbuff.c linux-2.6.16-imq/net/core/skbuff.c
|
||||
--- linux-2.6.16/net/core/skbuff.c 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/core/skbuff.c 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -425,6 +425,10 @@
|
||||
C(nfct_reasm);
|
||||
nf_conntrack_get_reasm(skb->nfct_reasm);
|
||||
#endif
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+ C(imq_flags);
|
||||
+ C(nf_info);
|
||||
+#endif /*CONFIG_IMQ*/
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
C(nf_bridge);
|
||||
nf_bridge_get(skb->nf_bridge);
|
||||
@@ -489,6 +493,10 @@
|
||||
#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
|
||||
new->ipvs_property = old->ipvs_property;
|
||||
#endif
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+ new->imq_flags = old->imq_flags;
|
||||
+ new->nf_info = old->nf_info;
|
||||
+#endif /*CONFIG_IMQ*/
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
new->nf_bridge = old->nf_bridge;
|
||||
nf_bridge_get(old->nf_bridge);
|
||||
diff -Nru linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-imq/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.16/net/ipv4/netfilter/Kconfig 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv4/netfilter/Kconfig 2006-03-25 21:54:10.000000000 +0000
|
||||
@@ -505,6 +505,17 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP_NF_TARGET_IMQ
|
||||
+ tristate "IMQ target support"
|
||||
+ depends on IP_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `IMQ' target which is used to specify if and
|
||||
+ to which IMQ device packets should get enqueued/dequeued.
|
||||
+
|
||||
+ For more information visit: http://www.linuximq.net/
|
||||
+
|
||||
+ To compile it as a module, choose M here. If unsure, say N.
|
||||
+
|
||||
config IP_NF_TARGET_TOS
|
||||
tristate "TOS target support"
|
||||
depends on IP_NF_MANGLE
|
||||
diff -Nru linux-2.6.16/net/ipv4/netfilter/Makefile linux-2.6.16-imq/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.16/net/ipv4/netfilter/Makefile 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv4/netfilter/Makefile 2006-03-25 21:06:00.000000000 +0000
|
||||
@@ -64,6 +64,7 @@
|
||||
obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_DSCP) += ipt_DSCP.o
|
||||
+obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
|
||||
diff -Nru linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-imq/net/ipv4/netfilter/ipt_IMQ.c
|
||||
--- linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv4/netfilter/ipt_IMQ.c 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,80 @@
|
||||
+/*
|
||||
+ * This target marks packets to be enqueued to an imq device
|
||||
+ */
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/skbuff.h>
|
||||
+#include <linux/netfilter_ipv4/ip_tables.h>
|
||||
+#include <linux/netfilter_ipv4/ipt_IMQ.h>
|
||||
+#include <linux/imq.h>
|
||||
+
|
||||
+static unsigned int imq_target(struct sk_buff **pskb,
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ unsigned int hooknum,
|
||||
+ const void *targinfo,
|
||||
+ void *userdata)
|
||||
+{
|
||||
+ struct ipt_imq_info *mr = (struct ipt_imq_info*)targinfo;
|
||||
+
|
||||
+ (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
|
||||
+
|
||||
+ return IPT_CONTINUE;
|
||||
+}
|
||||
+
|
||||
+static int imq_checkentry(const char *tablename,
|
||||
+ const struct ipt_entry *e,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ struct ipt_imq_info *mr;
|
||||
+
|
||||
+ if (targinfosize != IPT_ALIGN(sizeof(struct ipt_imq_info))) {
|
||||
+ printk(KERN_WARNING "IMQ: invalid targinfosize\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ mr = (struct ipt_imq_info*)targinfo;
|
||||
+
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "IMQ: IMQ can only be called from \"mangle\" table, not \"%s\"\n",
|
||||
+ tablename);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (mr->todev > IMQ_MAX_DEVS) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "IMQ: invalid device specified, highest is %u\n",
|
||||
+ IMQ_MAX_DEVS);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static struct ipt_target ipt_imq_reg = {
|
||||
+ .name = "IMQ",
|
||||
+ .target = imq_target,
|
||||
+ .checkentry = imq_checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
+
|
||||
+static int __init init(void)
|
||||
+{
|
||||
+ if (ipt_register_target(&ipt_imq_reg))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit fini(void)
|
||||
+{
|
||||
+ ipt_unregister_target(&ipt_imq_reg);
|
||||
+}
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
+
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nru linux-2.6.16/net/ipv6/netfilter/Kconfig linux-2.6.16-imq/net/ipv6/netfilter/Kconfig
|
||||
--- linux-2.6.16/net/ipv6/netfilter/Kconfig 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv6/netfilter/Kconfig 2006-03-25 21:54:48.000000000 +0000
|
||||
@@ -183,6 +183,15 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP6_NF_TARGET_IMQ
|
||||
+ tristate "IMQ target support"
|
||||
+ depends on IP6_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `IMQ' target which is used to specify if and
|
||||
+ to which imq device packets should get enqueued/dequeued.
|
||||
+
|
||||
+ To compile it as a module, choose M here. If unsure, say N.
|
||||
+
|
||||
config IP6_NF_TARGET_HL
|
||||
tristate 'HL (hoplimit) target support'
|
||||
depends on IP6_NF_MANGLE
|
||||
diff -Nru linux-2.6.16/net/ipv6/netfilter/Makefile linux-2.6.16-imq/net/ipv6/netfilter/Makefile
|
||||
--- linux-2.6.16/net/ipv6/netfilter/Makefile 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv6/netfilter/Makefile 2006-03-25 21:07:08.000000000 +0000
|
||||
@@ -15,6 +15,7 @@
|
||||
obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o
|
||||
obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
|
||||
obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o
|
||||
+obj-$(CONFIG_IP6_NF_TARGET_IMQ) += ip6t_IMQ.o
|
||||
obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o
|
||||
obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
|
||||
obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
|
||||
diff -Nru linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-imq/net/ipv6/netfilter/ip6t_IMQ.c
|
||||
--- linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/ipv6/netfilter/ip6t_IMQ.c 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -0,0 +1,80 @@
|
||||
+/*
|
||||
+ * This target marks packets to be enqueued to an imq device
|
||||
+ */
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/skbuff.h>
|
||||
+#include <linux/netfilter_ipv6/ip6_tables.h>
|
||||
+#include <linux/netfilter_ipv6/ip6t_IMQ.h>
|
||||
+#include <linux/imq.h>
|
||||
+
|
||||
+static unsigned int imq_target(struct sk_buff **pskb,
|
||||
+ unsigned int hooknum,
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ const void *targinfo,
|
||||
+ void *userdata)
|
||||
+{
|
||||
+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)targinfo;
|
||||
+
|
||||
+ (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
|
||||
+
|
||||
+ return IP6T_CONTINUE;
|
||||
+}
|
||||
+
|
||||
+static int imq_checkentry(const char *tablename,
|
||||
+ const struct ip6t_entry *e,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ struct ip6t_imq_info *mr;
|
||||
+
|
||||
+ if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_imq_info))) {
|
||||
+ printk(KERN_WARNING "IMQ: invalid targinfosize\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ mr = (struct ip6t_imq_info*)targinfo;
|
||||
+
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "IMQ: IMQ can only be called from \"mangle\" table, not \"%s\"\n",
|
||||
+ tablename);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (mr->todev > IMQ_MAX_DEVS) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "IMQ: invalid device specified, highest is %u\n",
|
||||
+ IMQ_MAX_DEVS);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static struct ip6t_target ip6t_imq_reg = {
|
||||
+ .name = "IMQ",
|
||||
+ .target = imq_target,
|
||||
+ .checkentry = imq_checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
+
|
||||
+static int __init init(void)
|
||||
+{
|
||||
+ if (ip6t_register_target(&ip6t_imq_reg))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit fini(void)
|
||||
+{
|
||||
+ ip6t_unregister_target(&ip6t_imq_reg);
|
||||
+}
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
+
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nru linux-2.6.16/net/sched/sch_generic.c linux-2.6.16-imq/net/sched/sch_generic.c
|
||||
--- linux-2.6.16/net/sched/sch_generic.c 2006-03-20 05:53:29.000000000 +0000
|
||||
+++ linux-2.6.16-imq/net/sched/sch_generic.c 2006-03-25 20:57:14.000000000 +0000
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+#include <linux/imq.h>
|
||||
+#endif
|
||||
#include <linux/init.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/list.h>
|
||||
@@ -136,7 +139,13 @@
|
||||
|
||||
if (!netif_queue_stopped(dev)) {
|
||||
int ret;
|
||||
- if (netdev_nit)
|
||||
+
|
||||
+ if (netdev_nit
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+ && !(skb->imq_flags & IMQ_F_ENQUEUE)
|
||||
+#endif
|
||||
+ )
|
||||
+
|
||||
dev_queue_xmit_nit(skb, dev);
|
||||
|
||||
ret = dev->hard_start_xmit(skb, dev);
|
||||
@@ -1,380 +0,0 @@
|
||||
Submitted by: Alexander E. Patrakov <patrakov@ums.usu.ru>
|
||||
Signed-off-by: Alexander E. Patrakov <patrakov@ums.usu.ru>
|
||||
Date: 2005-10-18
|
||||
Initial Package Version: 2.6.15
|
||||
Upstream Status: Rejected: they say it modifies the meaning of an existing ioctl
|
||||
Origin: http://chris.heathens.co.nz/linux/downloads/patches-2.6.4-cdh1.tar.gz
|
||||
Porting to linux-2.6.16 by Alexander E. Patrakov
|
||||
Description: This patch fixes dead keys and copy/paste of non-ASCII characters
|
||||
in UTF-8 mode on Linux console.
|
||||
See more details about the original patch at:
|
||||
http://chris.heathens.co.nz/linux/utf8.html
|
||||
|
||||
diff -ur linux-2.6.15-rc6.orig/drivers/char/consolemap.c linux-2.6.15-rc6.my/drivers/char/consolemap.c
|
||||
--- linux-2.6.15-rc6.orig/drivers/char/consolemap.c 2005-12-25 10:00:12.000000000 +0500
|
||||
+++ linux-2.6.15-rc6.my/drivers/char/consolemap.c 2005-12-25 10:01:22.000000000 +0500
|
||||
@@ -178,6 +178,7 @@
|
||||
unsigned long refcount;
|
||||
unsigned long sum;
|
||||
unsigned char *inverse_translations[4];
|
||||
+ u16 *inverse_trans_unicode;
|
||||
int readonly;
|
||||
};
|
||||
|
||||
@@ -208,6 +209,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
+static void set_inverse_trans_unicode(struct vc_data *conp,
|
||||
+ struct uni_pagedir *p)
|
||||
+{
|
||||
+ int i, j, k, glyph;
|
||||
+ u16 **p1, *p2;
|
||||
+ u16 *q;
|
||||
+
|
||||
+ if (!p) return;
|
||||
+ q = p->inverse_trans_unicode;
|
||||
+ if (!q) {
|
||||
+ q = p->inverse_trans_unicode =
|
||||
+ kmalloc(MAX_GLYPH * sizeof(u16), GFP_KERNEL);
|
||||
+ if (!q)
|
||||
+ return;
|
||||
+ }
|
||||
+ memset(q, 0, MAX_GLYPH * sizeof(u16));
|
||||
+
|
||||
+ for (i = 0; i < 32; i++) {
|
||||
+ p1 = p->uni_pgdir[i];
|
||||
+ if (!p1)
|
||||
+ continue;
|
||||
+ for (j = 0; j < 32; j++) {
|
||||
+ p2 = p1[j];
|
||||
+ if (!p2)
|
||||
+ continue;
|
||||
+ for (k = 0; k < 64; k++) {
|
||||
+ glyph = p2[k];
|
||||
+ if (glyph >= 0 && glyph < MAX_GLYPH
|
||||
+ && q[glyph] < 32)
|
||||
+ q[glyph] = (i << 11) + (j << 6) + k;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
unsigned short *set_translate(int m, struct vc_data *vc)
|
||||
{
|
||||
inv_translate[vc->vc_num] = m;
|
||||
@@ -218,19 +254,29 @@
|
||||
* Inverse translation is impossible for several reasons:
|
||||
* 1. The font<->character maps are not 1-1.
|
||||
* 2. The text may have been written while a different translation map
|
||||
- * was active, or using Unicode.
|
||||
+ * was active.
|
||||
* Still, it is now possible to a certain extent to cut and paste non-ASCII.
|
||||
*/
|
||||
-unsigned char inverse_translate(struct vc_data *conp, int glyph)
|
||||
+u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode)
|
||||
{
|
||||
struct uni_pagedir *p;
|
||||
+ int m;
|
||||
if (glyph < 0 || glyph >= MAX_GLYPH)
|
||||
return 0;
|
||||
- else if (!(p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc) ||
|
||||
- !p->inverse_translations[inv_translate[conp->vc_num]])
|
||||
+ else if (!(p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc))
|
||||
return glyph;
|
||||
- else
|
||||
- return p->inverse_translations[inv_translate[conp->vc_num]][glyph];
|
||||
+ else if (use_unicode) {
|
||||
+ if (!p->inverse_trans_unicode)
|
||||
+ return glyph;
|
||||
+ else
|
||||
+ return p->inverse_trans_unicode[glyph];
|
||||
+ } else {
|
||||
+ m = inv_translate[conp->vc_num];
|
||||
+ if (!p->inverse_translations[m])
|
||||
+ return glyph;
|
||||
+ else
|
||||
+ return p->inverse_translations[m][glyph];
|
||||
+ }
|
||||
}
|
||||
|
||||
static void update_user_maps(void)
|
||||
@@ -244,6 +290,7 @@
|
||||
p = (struct uni_pagedir *)*vc_cons[i].d->vc_uni_pagedir_loc;
|
||||
if (p && p != q) {
|
||||
set_inverse_transl(vc_cons[i].d, p, USER_MAP);
|
||||
+ set_inverse_trans_unicode(vc_cons[i].d, p);
|
||||
q = p;
|
||||
}
|
||||
}
|
||||
@@ -354,6 +401,10 @@
|
||||
kfree(p->inverse_translations[i]);
|
||||
p->inverse_translations[i] = NULL;
|
||||
}
|
||||
+ if (p->inverse_trans_unicode) {
|
||||
+ kfree(p->inverse_trans_unicode);
|
||||
+ p->inverse_trans_unicode = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
void con_free_unimap(struct vc_data *vc)
|
||||
@@ -512,6 +563,7 @@
|
||||
|
||||
for (i = 0; i <= 3; i++)
|
||||
set_inverse_transl(vc, p, i); /* Update all inverse translations */
|
||||
+ set_inverse_trans_unicode(vc, p);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -562,6 +614,7 @@
|
||||
|
||||
for (i = 0; i <= 3; i++)
|
||||
set_inverse_transl(vc, p, i); /* Update all inverse translations */
|
||||
+ set_inverse_trans_unicode(vc, p);
|
||||
dflt = p;
|
||||
return err;
|
||||
}
|
||||
@@ -618,6 +671,19 @@
|
||||
p->readonly = rdonly;
|
||||
}
|
||||
|
||||
+/* may be called during an interrupt */
|
||||
+u32 conv_8bit_to_uni(unsigned char c)
|
||||
+{
|
||||
+ /*
|
||||
+ * Always use USER_MAP. This function is used by the keyboard,
|
||||
+ * which shouldn't be affected by G0/G1 switching, etc.
|
||||
+ * If the user map still contains default values, i.e. the
|
||||
+ * direct-to-font mapping, then assume user is using Latin1.
|
||||
+ */
|
||||
+ unsigned short uni = translations[USER_MAP][c];
|
||||
+ return uni == (0xf000 | c) ? c : uni;
|
||||
+}
|
||||
+
|
||||
int
|
||||
conv_uni_to_pc(struct vc_data *conp, long ucs)
|
||||
{
|
||||
diff -ur linux-2.6.15-rc6.orig/drivers/char/keyboard.c linux-2.6.15-rc6.my/drivers/char/keyboard.c
|
||||
--- linux-2.6.15-rc6.orig/drivers/char/keyboard.c 2005-12-25 10:00:12.000000000 +0500
|
||||
+++ linux-2.6.15-rc6.my/drivers/char/keyboard.c 2005-12-25 10:01:22.000000000 +0500
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
+#include <linux/consolemap.h>
|
||||
#include <linux/kbd_kern.h>
|
||||
#include <linux/kbd_diacr.h>
|
||||
#include <linux/vt_kern.h>
|
||||
@@ -329,10 +330,9 @@
|
||||
* Many other routines do put_queue, but I think either
|
||||
* they produce ASCII, or they produce some user-assigned
|
||||
* string, and in both cases we might assume that it is
|
||||
- * in utf-8 already. UTF-8 is defined for words of up to 31 bits,
|
||||
- * but we need only 16 bits here
|
||||
+ * in utf-8 already.
|
||||
*/
|
||||
-static void to_utf8(struct vc_data *vc, ushort c)
|
||||
+static void to_utf8(struct vc_data *vc, uint c)
|
||||
{
|
||||
if (c < 0x80)
|
||||
/* 0******* */
|
||||
@@ -341,14 +341,33 @@
|
||||
/* 110***** 10****** */
|
||||
put_queue(vc, 0xc0 | (c >> 6));
|
||||
put_queue(vc, 0x80 | (c & 0x3f));
|
||||
- } else {
|
||||
+ } else if (c < 0x10000) {
|
||||
+ if (c >= 0xD800 && c < 0xE000)
|
||||
+ return;
|
||||
+ if (c == 0xFFFF)
|
||||
+ return;
|
||||
/* 1110**** 10****** 10****** */
|
||||
put_queue(vc, 0xe0 | (c >> 12));
|
||||
put_queue(vc, 0x80 | ((c >> 6) & 0x3f));
|
||||
put_queue(vc, 0x80 | (c & 0x3f));
|
||||
+ } else if (c < 0x110000) {
|
||||
+ /* 11110*** 10****** 10****** 10****** */
|
||||
+ put_queue(vc, 0xf0 | (c >> 18));
|
||||
+ put_queue(vc, 0x80 | ((c >> 12) & 0x3f));
|
||||
+ put_queue(vc, 0x80 | ((c >> 6) & 0x3f));
|
||||
+ put_queue(vc, 0x80 | (c & 0x3f));
|
||||
}
|
||||
}
|
||||
|
||||
+static void put_8bit(struct vc_data *vc, u8 c)
|
||||
+{
|
||||
+ if (kbd->kbdmode != VC_UNICODE || c < 32 || c == 127)
|
||||
+ /* Don't translate control chars */
|
||||
+ put_queue(vc, c);
|
||||
+ else
|
||||
+ to_utf8(vc, conv_8bit_to_uni(c));
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Called after returning from RAW mode or when changing consoles - recompute
|
||||
* shift_down[] and shift_state from key_down[] maybe called when keymap is
|
||||
@@ -409,7 +428,7 @@
|
||||
if (ch == ' ' || ch == d)
|
||||
return d;
|
||||
|
||||
- put_queue(vc, d);
|
||||
+ put_8bit(vc, d);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@@ -419,7 +438,7 @@
|
||||
static void fn_enter(struct vc_data *vc, struct pt_regs *regs)
|
||||
{
|
||||
if (diacr) {
|
||||
- put_queue(vc, diacr);
|
||||
+ put_8bit(vc, diacr);
|
||||
diacr = 0;
|
||||
}
|
||||
put_queue(vc, 13);
|
||||
@@ -628,7 +647,7 @@
|
||||
diacr = value;
|
||||
return;
|
||||
}
|
||||
- put_queue(vc, value);
|
||||
+ put_8bit(vc, value);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -774,7 +793,7 @@
|
||||
/* kludge */
|
||||
if (up_flag && shift_state != old_state && npadch != -1) {
|
||||
if (kbd->kbdmode == VC_UNICODE)
|
||||
- to_utf8(vc, npadch & 0xffff);
|
||||
+ to_utf8(vc, npadch);
|
||||
else
|
||||
put_queue(vc, npadch & 0xff);
|
||||
npadch = -1;
|
||||
diff -ur linux-2.6.15-rc6.orig/drivers/char/selection.c linux-2.6.15-rc6.my/drivers/char/selection.c
|
||||
--- linux-2.6.15-rc6.orig/drivers/char/selection.c 2005-12-25 10:00:12.000000000 +0500
|
||||
+++ linux-2.6.15-rc6.my/drivers/char/selection.c 2005-12-25 10:01:22.000000000 +0500
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
+#include <linux/kbd_kern.h>
|
||||
#include <linux/vt_kern.h>
|
||||
#include <linux/consolemap.h>
|
||||
#include <linux/selection.h>
|
||||
@@ -34,6 +35,7 @@
|
||||
/* Variables for selection control. */
|
||||
/* Use a dynamic buffer, instead of static (Dec 1994) */
|
||||
struct vc_data *sel_cons; /* must not be disallocated */
|
||||
+static int use_unicode;
|
||||
static volatile int sel_start = -1; /* cleared by clear_selection */
|
||||
static int sel_end;
|
||||
static int sel_buffer_lth;
|
||||
@@ -54,10 +56,11 @@
|
||||
complement_pos(sel_cons, where);
|
||||
}
|
||||
|
||||
-static unsigned char
|
||||
+static u16
|
||||
sel_pos(int n)
|
||||
{
|
||||
- return inverse_translate(sel_cons, screen_glyph(sel_cons, n));
|
||||
+ return inverse_translate(sel_cons, screen_glyph(sel_cons, n),
|
||||
+ use_unicode);
|
||||
}
|
||||
|
||||
/* remove the current selection highlight, if any,
|
||||
@@ -86,8 +89,8 @@
|
||||
0xFF7FFFFF /* latin-1 accented letters, not division sign */
|
||||
};
|
||||
|
||||
-static inline int inword(const unsigned char c) {
|
||||
- return ( inwordLut[c>>5] >> (c & 0x1F) ) & 1;
|
||||
+static inline int inword(const u16 c) {
|
||||
+ return c > 0xff || (( inwordLut[c>>5] >> (c & 0x1F) ) & 1);
|
||||
}
|
||||
|
||||
/* set inwordLut contents. Invoked by ioctl(). */
|
||||
@@ -108,13 +111,36 @@
|
||||
return (v > u) ? u : v;
|
||||
}
|
||||
|
||||
+/* stores the char in UTF8 and returns the number of bytes used (1-3) */
|
||||
+int store_utf8(u16 c, char *p)
|
||||
+{
|
||||
+ if (c < 0x80) {
|
||||
+ /* 0******* */
|
||||
+ p[0] = c;
|
||||
+ return 1;
|
||||
+ } else if (c < 0x800) {
|
||||
+ /* 110***** 10****** */
|
||||
+ p[0] = 0xc0 | (c >> 6);
|
||||
+ p[1] = 0x80 | (c & 0x3f);
|
||||
+ return 2;
|
||||
+ } else {
|
||||
+ /* 1110**** 10****** 10****** */
|
||||
+ p[0] = 0xe0 | (c >> 12);
|
||||
+ p[1] = 0x80 | ((c >> 6) & 0x3f);
|
||||
+ p[2] = 0x80 | (c & 0x3f);
|
||||
+ return 3;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* set the current selection. Invoked by ioctl() or by kernel code. */
|
||||
int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty)
|
||||
{
|
||||
struct vc_data *vc = vc_cons[fg_console].d;
|
||||
int sel_mode, new_sel_start, new_sel_end, spc;
|
||||
char *bp, *obp;
|
||||
- int i, ps, pe;
|
||||
+ int i, ps, pe, multiplier;
|
||||
+ u16 c;
|
||||
+ struct kbd_struct *kbd = kbd_table + fg_console;
|
||||
|
||||
poke_blanked_console();
|
||||
|
||||
@@ -158,7 +184,8 @@
|
||||
clear_selection();
|
||||
sel_cons = vc_cons[fg_console].d;
|
||||
}
|
||||
-
|
||||
+ use_unicode = kbd && kbd->kbdmode == VC_UNICODE;
|
||||
+
|
||||
switch (sel_mode)
|
||||
{
|
||||
case TIOCL_SELCHAR: /* character-by-character selection */
|
||||
@@ -240,7 +267,8 @@
|
||||
sel_end = new_sel_end;
|
||||
|
||||
/* Allocate a new buffer before freeing the old one ... */
|
||||
- bp = kmalloc((sel_end-sel_start)/2+1, GFP_KERNEL);
|
||||
+ multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */
|
||||
+ bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL);
|
||||
if (!bp) {
|
||||
printk(KERN_WARNING "selection: kmalloc() failed\n");
|
||||
clear_selection();
|
||||
@@ -251,8 +279,12 @@
|
||||
|
||||
obp = bp;
|
||||
for (i = sel_start; i <= sel_end; i += 2) {
|
||||
- *bp = sel_pos(i);
|
||||
- if (!isspace(*bp++))
|
||||
+ c = sel_pos(i);
|
||||
+ if (use_unicode)
|
||||
+ bp += store_utf8(c, bp);
|
||||
+ else
|
||||
+ *bp++ = c;
|
||||
+ if (!isspace(c))
|
||||
obp = bp;
|
||||
if (! ((i + 2) % vc->vc_size_row)) {
|
||||
/* strip trailing blanks from line and add newline,
|
||||
diff -ur linux-2.6.15-rc6.orig/include/linux/consolemap.h linux-2.6.15-rc6.my/include/linux/consolemap.h
|
||||
--- linux-2.6.15-rc6.orig/include/linux/consolemap.h 2005-12-25 10:00:13.000000000 +0500
|
||||
+++ linux-2.6.15-rc6.my/include/linux/consolemap.h 2005-12-25 10:01:22.000000000 +0500
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
struct vc_data;
|
||||
|
||||
-extern unsigned char inverse_translate(struct vc_data *conp, int glyph);
|
||||
+extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode);
|
||||
extern unsigned short *set_translate(int m, struct vc_data *vc);
|
||||
extern int conv_uni_to_pc(struct vc_data *conp, long ucs);
|
||||
+extern u32 conv_8bit_to_uni(unsigned char c);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,277 +0,0 @@
|
||||
--- /dev/null 2008-04-27 15:35:57.000000000 +0200
|
||||
+++ linux/net/ipsec/version.c 2008-05-17 18:35:27.000000000 +0200
|
||||
@@ -0,0 +1,44 @@
|
||||
+/*
|
||||
+ * return IPsec version information
|
||||
+ * Copyright (C) 2001 Henry Spencer.
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU Library General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or (at your
|
||||
+ * option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful, but
|
||||
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
|
||||
+ * License for more details.
|
||||
+ *
|
||||
+ * RCSID $Id: version.in.c,v 1.2 2004/04/14 05:09:46 ken Exp $
|
||||
+ */
|
||||
+
|
||||
+#ifdef __KERNEL__
|
||||
+#include <linux/netdevice.h>
|
||||
+#endif
|
||||
+
|
||||
+#include "openswan.h"
|
||||
+
|
||||
+#define V "2.4.12" /* substituted in by Makefile */
|
||||
+static const char openswan_number[] = V;
|
||||
+static const char openswan_string[] = "Openswan " V;
|
||||
+
|
||||
+/*
|
||||
+ - ipsec_version_code - return IPsec version number/code, as string
|
||||
+ */
|
||||
+const char *
|
||||
+ipsec_version_code()
|
||||
+{
|
||||
+ return openswan_number;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ - ipsec_version_string - return full version string
|
||||
+ */
|
||||
+const char *
|
||||
+ipsec_version_string()
|
||||
+{
|
||||
+ return openswan_string;
|
||||
+}
|
||||
--- /dev/null 2008-04-27 15:35:57.000000000 +0200
|
||||
+++ linux/net/ipsec/zutil.c 2008-05-16 17:28:08.000000000 +0200
|
||||
@@ -0,0 +1,227 @@
|
||||
+/* zutil.c -- target dependent utility functions for the compression library
|
||||
+ * Copyright (C) 1995-2002 Jean-loup Gailly.
|
||||
+ * For conditions of distribution and use, see copyright notice in zlib.h
|
||||
+ */
|
||||
+
|
||||
+/* @(#) $Id: zutil.c,v 1.5 2004/07/10 07:48:40 mcr Exp $ */
|
||||
+
|
||||
+#include <zlib/zutil.h>
|
||||
+
|
||||
+#define MY_ZCALLOC
|
||||
+
|
||||
+struct internal_state {int dummy;}; /* for buggy compilers */
|
||||
+
|
||||
+#ifndef STDC
|
||||
+extern void exit OF((int));
|
||||
+#endif
|
||||
+
|
||||
+const char *z_errmsg[10] = {
|
||||
+"need dictionary", /* Z_NEED_DICT 2 */
|
||||
+"stream end", /* Z_STREAM_END 1 */
|
||||
+"", /* Z_OK 0 */
|
||||
+"file error", /* Z_ERRNO (-1) */
|
||||
+"stream error", /* Z_STREAM_ERROR (-2) */
|
||||
+"data error", /* Z_DATA_ERROR (-3) */
|
||||
+"insufficient memory", /* Z_MEM_ERROR (-4) */
|
||||
+"buffer error", /* Z_BUF_ERROR (-5) */
|
||||
+"incompatible version",/* Z_VERSION_ERROR (-6) */
|
||||
+""};
|
||||
+
|
||||
+
|
||||
+const char * ZEXPORT zlibVersion()
|
||||
+{
|
||||
+ return ZLIB_VERSION;
|
||||
+}
|
||||
+
|
||||
+#ifdef DEBUG
|
||||
+
|
||||
+# ifndef verbose
|
||||
+# define verbose 0
|
||||
+# endif
|
||||
+int z_verbose = verbose;
|
||||
+
|
||||
+void z_error (m)
|
||||
+ char *m;
|
||||
+{
|
||||
+ fprintf(stderr, "%s\n", m);
|
||||
+ exit(1);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/* exported to allow conversion of error code to string for compress() and
|
||||
+ * uncompress()
|
||||
+ */
|
||||
+const char * ZEXPORT zError(err)
|
||||
+ int err;
|
||||
+{
|
||||
+ return ERR_MSG(err);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#ifndef HAVE_MEMCPY
|
||||
+
|
||||
+void zmemcpy(dest, source, len)
|
||||
+ Bytef* dest;
|
||||
+ const Bytef* source;
|
||||
+ uInt len;
|
||||
+{
|
||||
+ if (len == 0) return;
|
||||
+ do {
|
||||
+ *dest++ = *source++; /* ??? to be unrolled */
|
||||
+ } while (--len != 0);
|
||||
+}
|
||||
+
|
||||
+int zmemcmp(s1, s2, len)
|
||||
+ const Bytef* s1;
|
||||
+ const Bytef* s2;
|
||||
+ uInt len;
|
||||
+{
|
||||
+ uInt j;
|
||||
+
|
||||
+ for (j = 0; j < len; j++) {
|
||||
+ if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void zmemzero(dest, len)
|
||||
+ Bytef* dest;
|
||||
+ uInt len;
|
||||
+{
|
||||
+ if (len == 0) return;
|
||||
+ do {
|
||||
+ *dest++ = 0; /* ??? to be unrolled */
|
||||
+ } while (--len != 0);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __TURBOC__
|
||||
+#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__)
|
||||
+/* Small and medium model in Turbo C are for now limited to near allocation
|
||||
+ * with reduced MAX_WBITS and MAX_MEM_LEVEL
|
||||
+ */
|
||||
+# define MY_ZCALLOC
|
||||
+
|
||||
+/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
|
||||
+ * and farmalloc(64K) returns a pointer with an offset of 8, so we
|
||||
+ * must fix the pointer. Warning: the pointer must be put back to its
|
||||
+ * original form in order to free it, use zcfree().
|
||||
+ */
|
||||
+
|
||||
+#define MAX_PTR 10
|
||||
+/* 10*64K = 640K */
|
||||
+
|
||||
+local int next_ptr = 0;
|
||||
+
|
||||
+typedef struct ptr_table_s {
|
||||
+ voidpf org_ptr;
|
||||
+ voidpf new_ptr;
|
||||
+} ptr_table;
|
||||
+
|
||||
+local ptr_table table[MAX_PTR];
|
||||
+/* This table is used to remember the original form of pointers
|
||||
+ * to large buffers (64K). Such pointers are normalized with a zero offset.
|
||||
+ * Since MSDOS is not a preemptive multitasking OS, this table is not
|
||||
+ * protected from concurrent access. This hack doesn't work anyway on
|
||||
+ * a protected system like OS/2. Use Microsoft C instead.
|
||||
+ */
|
||||
+
|
||||
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
+{
|
||||
+ voidpf buf = opaque; /* just to make some compilers happy */
|
||||
+ ulg bsize = (ulg)items*size;
|
||||
+
|
||||
+ /* If we allocate less than 65520 bytes, we assume that farmalloc
|
||||
+ * will return a usable pointer which doesn't have to be normalized.
|
||||
+ */
|
||||
+ if (bsize < 65520L) {
|
||||
+ buf = farmalloc(bsize);
|
||||
+ if (*(ush*)&buf != 0) return buf;
|
||||
+ } else {
|
||||
+ buf = farmalloc(bsize + 16L);
|
||||
+ }
|
||||
+ if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
|
||||
+ table[next_ptr].org_ptr = buf;
|
||||
+
|
||||
+ /* Normalize the pointer to seg:0 */
|
||||
+ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
|
||||
+ *(ush*)&buf = 0;
|
||||
+ table[next_ptr++].new_ptr = buf;
|
||||
+ return buf;
|
||||
+}
|
||||
+
|
||||
+void zcfree (voidpf opaque, voidpf ptr)
|
||||
+{
|
||||
+ int n;
|
||||
+ if (*(ush*)&ptr != 0) { /* object < 64K */
|
||||
+ farfree(ptr);
|
||||
+ return;
|
||||
+ }
|
||||
+ /* Find the original pointer */
|
||||
+ for (n = 0; n < next_ptr; n++) {
|
||||
+ if (ptr != table[n].new_ptr) continue;
|
||||
+
|
||||
+ farfree(table[n].org_ptr);
|
||||
+ while (++n < next_ptr) {
|
||||
+ table[n-1] = table[n];
|
||||
+ }
|
||||
+ next_ptr--;
|
||||
+ return;
|
||||
+ }
|
||||
+ ptr = opaque; /* just to make some compilers happy */
|
||||
+ Assert(0, "zcfree: ptr not found");
|
||||
+}
|
||||
+#endif
|
||||
+#endif /* __TURBOC__ */
|
||||
+
|
||||
+
|
||||
+#if defined(M_I86) && !defined(__32BIT__)
|
||||
+/* Microsoft C in 16-bit mode */
|
||||
+
|
||||
+# define MY_ZCALLOC
|
||||
+
|
||||
+#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
|
||||
+# define _halloc halloc
|
||||
+# define _hfree hfree
|
||||
+#endif
|
||||
+
|
||||
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
+{
|
||||
+ if (opaque) opaque = 0; /* to make compiler happy */
|
||||
+ return _halloc((long)items, size);
|
||||
+}
|
||||
+
|
||||
+void zcfree (voidpf opaque, voidpf ptr)
|
||||
+{
|
||||
+ if (opaque) opaque = 0; /* to make compiler happy */
|
||||
+ _hfree(ptr);
|
||||
+}
|
||||
+
|
||||
+#endif /* MSC */
|
||||
+
|
||||
+
|
||||
+#ifndef MY_ZCALLOC /* Any system without a special alloc function */
|
||||
+
|
||||
+#ifndef STDC
|
||||
+extern voidp calloc OF((uInt items, uInt size));
|
||||
+extern void free OF((voidpf ptr));
|
||||
+#endif
|
||||
+
|
||||
+voidpf zcalloc (opaque, items, size)
|
||||
+ voidpf opaque;
|
||||
+ unsigned items;
|
||||
+ unsigned size;
|
||||
+{
|
||||
+ if (opaque) items += size - size; /* make compiler happy */
|
||||
+ return (voidpf)calloc(items, size);
|
||||
+}
|
||||
+
|
||||
+void zcfree (opaque, ptr)
|
||||
+ voidpf opaque;
|
||||
+ voidpf ptr;
|
||||
+{
|
||||
+ free(ptr);
|
||||
+ if (opaque) return; /* make compiler happy */
|
||||
+}
|
||||
+
|
||||
+#endif /* MY_ZCALLOC */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
--- linux-2.6.20.oorig/net/ipsec/ipsec_alg_cryptoapi.c 2007-02-15 12:30:41.000000000 +0100
|
||||
+++ linux-2.6.20/net/ipsec/ipsec_alg_cryptoapi.c 2007-02-15 13:47:07.000000000 +0100
|
||||
@@ -197,7 +197,7 @@ static struct ipsec_alg_capi_cipher alg_
|
||||
*/
|
||||
int setup_cipher(const char *ciphername)
|
||||
{
|
||||
- return crypto_alg_available(ciphername, 0);
|
||||
+ return crypto_has_alg(ciphername, 0, CRYPTO_ALG_ASYNC);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1,10 +0,0 @@
|
||||
--- _realsetup
|
||||
+++ _realsetup
|
||||
@@ -193,8 +193,8 @@
|
||||
|
||||
# preliminaries
|
||||
perform rm -f $lock
|
||||
- mkdir -p rundir > /dev/null 2>/dev/null
|
||||
- mkdir -p subsysdir > /dev/null 2>/dev/null
|
||||
+ mkdir -p $rundir > /dev/null 2>/dev/null
|
||||
+ mkdir -p $subsysdir > /dev/null 2>/dev/null
|
||||
@@ -1,79 +0,0 @@
|
||||
--- _startklips_old 2007-08-13 22:45:45.000000000 +0200
|
||||
+++ _startklips 2007-08-13 21:27:00.000000000 +0200
|
||||
@@ -104,23 +104,35 @@
|
||||
|
||||
# figure out ifconfig for interface
|
||||
addr=
|
||||
- eval `ifconfig $phys |
|
||||
- awk '$1 == "inet" && $2 ~ /^addr:/ && $NF ~ /^Mask:/ {
|
||||
- gsub(/:/, " ", $0)
|
||||
- print "addr=" $3
|
||||
- other = $5
|
||||
- if ($4 == "Bcast")
|
||||
- print "type=broadcast"
|
||||
- else if ($4 == "P-t-P")
|
||||
- print "type=pointopoint"
|
||||
- else if (NF == 5) {
|
||||
- print "type="
|
||||
- other = ""
|
||||
- } else
|
||||
- print "type=unknown"
|
||||
- print "otheraddr=" other
|
||||
- print "mask=" $NF
|
||||
- }'`
|
||||
+ eval `ip addr show $phys | awk '$3 ~ /BROADCAST|POINTOPOINT/ {
|
||||
+ if ($3 ~ /BROADCAST/)
|
||||
+ print "type=broadcast";
|
||||
+ else if ($3 ~ /POINTOPOINT/)
|
||||
+ print "type=pointopoint";
|
||||
+ else {
|
||||
+ print "type=";
|
||||
+ }
|
||||
+ }'`
|
||||
+
|
||||
+ if [ "$type" == "broadcast" ]; then
|
||||
+ eval `ip addr show $phys | awk '$1 == "inet" { gsub(/\//, " ");
|
||||
+ print "addr=" $2;
|
||||
+ print "mask=" $3;
|
||||
+ print "otheraddr=" $5;
|
||||
+ }'`
|
||||
+ elif [ "$type" == "pointopoint" ]; then
|
||||
+ eval `ip addr show $phys | awk '$1 == "inet" { gsub(/\//, " ");
|
||||
+ print "addr=" $2;
|
||||
+ print "mask=" $5;
|
||||
+ print "otheraddr=" $4;
|
||||
+ }'`
|
||||
+ else
|
||||
+ type="unknown"
|
||||
+ otheraddr=
|
||||
+ fi
|
||||
+
|
||||
+ eval `whatmask /$mask | awk -F': ' '$1 ~ /^Netmask =/ { print "mask=" $2 }'`
|
||||
+
|
||||
if test " $addr" = " "
|
||||
then
|
||||
echo "unable to determine address of \`$phys'"
|
||||
@@ -129,7 +141,7 @@
|
||||
if test " $type" = " unknown"
|
||||
then
|
||||
echo "\`$phys' is of an unknown type"
|
||||
- exit 1
|
||||
+ exit 1
|
||||
fi
|
||||
if test " $omtu" != " "
|
||||
then
|
||||
@@ -223,10 +235,10 @@
|
||||
fi
|
||||
next=`netstat -nr |
|
||||
awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $2 }'`
|
||||
- if [ "$next" = "0.0.0.0" ] ; then
|
||||
- next=`ip addr list $phys | grep -E '^ +inet6*.*scope global $phys' |
|
||||
- awk '{ print $2}' | awk -F / '{ print $1 }'`
|
||||
- fi
|
||||
+ #if [ "$next" = "0.0.0.0" ] ; then
|
||||
+ # next=`ip addr list $phys | grep -E '^ +inet6*.*scope global $phys' |
|
||||
+ # awk '{ print $4 }' | awk -F / '{ print $1 }'`
|
||||
+ #fi
|
||||
klipsinterface "ipsec0=$phys" $next
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,125 +0,0 @@
|
||||
packaging/utils/nattpatch 2.6
|
||||
--- /dev/null Tue Mar 11 13:02:56 2003
|
||||
+++ nat-t/include/net/xfrmudp.h Mon Feb 9 13:51:03 2004
|
||||
@@ -0,0 +1,10 @@
|
||||
+/*
|
||||
+ * pointer to function for type that xfrm4_input wants, to permit
|
||||
+ * decoupling of XFRM from udp.c
|
||||
+ */
|
||||
+#define HAVE_XFRM4_UDP_REGISTER
|
||||
+
|
||||
+typedef int (*xfrm4_rcv_encap_t)(struct sk_buff *skb, __u16 encap_type);
|
||||
+extern int udp4_register_esp_rcvencap(xfrm4_rcv_encap_t func
|
||||
+ , xfrm4_rcv_encap_t *oldfunc);
|
||||
+extern int udp4_unregister_esp_rcvencap(xfrm4_rcv_encap_t func);
|
||||
--- /distros/kernel/linux-2.6.11.2/net/ipv4/Kconfig 2005-03-09 03:12:33.000000000 -0500
|
||||
+++ swan26/net/ipv4/Kconfig 2005-04-04 18:46:13.000000000 -0400
|
||||
@@ -351,2 +351,8 @@
|
||||
|
||||
+config IPSEC_NAT_TRAVERSAL
|
||||
+ bool "IPSEC NAT-Traversal (KLIPS compatible)"
|
||||
+ depends on INET
|
||||
+ ---help---
|
||||
+ Includes support for RFC3947/RFC3948 NAT-Traversal of ESP over UDP.
|
||||
+
|
||||
config IP_TCPDIAG
|
||||
--- plain26/net/ipv4/udp.c.orig 2006-01-02 22:21:10.000000000 -0500
|
||||
+++ plain26/net/ipv4/udp.c 2006-01-12 20:18:57.000000000 -0500
|
||||
@@ -110,2 +110,3 @@
|
||||
#include <net/xfrm.h>
|
||||
+#include <net/xfrmudp.h>
|
||||
|
||||
@@ -894,6 +897,44 @@
|
||||
sk_common_release(sk);
|
||||
}
|
||||
|
||||
+#if defined(CONFIG_XFRM) || defined(CONFIG_IPSEC_NAT_TRAVERSAL)
|
||||
+
|
||||
+/* if XFRM isn't a module, then register it directly. */
|
||||
+#if !defined(CONFIG_XFRM_MODULE)
|
||||
+static xfrm4_rcv_encap_t xfrm4_rcv_encap_func = xfrm4_rcv_encap;
|
||||
+#else
|
||||
+static xfrm4_rcv_encap_t xfrm4_rcv_encap_func = NULL;
|
||||
+#endif
|
||||
+
|
||||
+static xfrm4_rcv_encap_t xfrm4_rcv_encap_func;
|
||||
+
|
||||
+int udp4_register_esp_rcvencap(xfrm4_rcv_encap_t func
|
||||
+ , xfrm4_rcv_encap_t *oldfunc)
|
||||
+{
|
||||
+ if(oldfunc != NULL) {
|
||||
+ *oldfunc = xfrm4_rcv_encap_func;
|
||||
+ }
|
||||
+
|
||||
+#if 0
|
||||
+ if(xfrm4_rcv_encap_func != NULL)
|
||||
+ return -1;
|
||||
+#endif
|
||||
+
|
||||
+ xfrm4_rcv_encap_func = func;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int udp4_unregister_esp_rcvencap(xfrm4_rcv_encap_t func)
|
||||
+{
|
||||
+ if(xfrm4_rcv_encap_func != func)
|
||||
+ return -1;
|
||||
+
|
||||
+ xfrm4_rcv_encap_func = NULL;
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_XFRM || defined(CONFIG_IPSEC_NAT_TRAVERSAL)*/
|
||||
+
|
||||
+
|
||||
/* return:
|
||||
* 1 if the the UDP system should process it
|
||||
* 0 if we should drop this packet
|
||||
@@ -901,9 +940,9 @@
|
||||
*/
|
||||
static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
|
||||
{
|
||||
-#ifndef CONFIG_XFRM
|
||||
+#if !defined(CONFIG_XFRM) && !defined(CONFIG_IPSEC_NAT_TRAVERSAL)
|
||||
return 1;
|
||||
-#else
|
||||
+#else /* either CONFIG_XFRM or CONFIG_IPSEC_NAT_TRAVERSAL */
|
||||
struct udp_sock *up = udp_sk(sk);
|
||||
struct udphdr *uh = skb->h.uh;
|
||||
struct iphdr *iph;
|
||||
@@ -1021,10 +1060,14 @@
|
||||
return 0;
|
||||
}
|
||||
if (ret < 0) {
|
||||
- /* process the ESP packet */
|
||||
- ret = xfrm4_rcv_encap(skb, up->encap_type);
|
||||
- UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS);
|
||||
- return -ret;
|
||||
+ if(xfrm4_rcv_encap_func != NULL) {
|
||||
+ ret = (*xfrm4_rcv_encap_func)(skb, up->encap_type);
|
||||
+ UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS);
|
||||
+ } else {
|
||||
+ UDP_INC_STATS_BH(UDP_MIB_INERRORS);
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ return ret;
|
||||
}
|
||||
/* FALLTHROUGH -- it's a UDP Packet */
|
||||
}
|
||||
@@ -1114,7 +1157,6 @@
|
||||
/*
|
||||
* All we need to do is get the socket, and then do a checksum.
|
||||
*/
|
||||
-
|
||||
int udp_rcv(struct sk_buff *skb)
|
||||
{
|
||||
struct sock *sk;
|
||||
@@ -1571,3 +1613,9 @@
|
||||
EXPORT_SYMBOL(udp_proc_register);
|
||||
EXPORT_SYMBOL(udp_proc_unregister);
|
||||
#endif
|
||||
+
|
||||
+#if defined(CONFIG_IPSEC_NAT_TRAVERSAL)
|
||||
+EXPORT_SYMBOL(udp4_register_esp_rcvencap);
|
||||
+EXPORT_SYMBOL(udp4_unregister_esp_rcvencap);
|
||||
+#endif
|
||||
+
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,172 +0,0 @@
|
||||
--- ppp/pppd/demand.c
|
||||
+++ ppp/pppd/demand.c 2000/06/28 14:54:04
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
+#include <unistd.h>
|
||||
+#include <syslog.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -32,6 +34,8 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
+#include <arpa/inet.h>
|
||||
#ifdef PPP_FILTER
|
||||
#include <net/if.h>
|
||||
#include <net/bpf.h>
|
||||
@@ -210,6 +214,14 @@
|
||||
int c, rv;
|
||||
|
||||
rv = 0;
|
||||
+
|
||||
+/* check for synchronous connection... */
|
||||
+
|
||||
+ if ( (p[0] == 0xFF) && (p[1] == 0x03) ) {
|
||||
+ rv = loop_frame(p,n);
|
||||
+ return rv;
|
||||
+ }
|
||||
+
|
||||
for (; n > 0; --n) {
|
||||
c = *p++;
|
||||
if (c == PPP_FLAG) {
|
||||
@@ -288,17 +300,102 @@
|
||||
* loopback, now that the real serial link is up.
|
||||
*/
|
||||
void
|
||||
-demand_rexmit(proto)
|
||||
+demand_rexmit(proto, newip)
|
||||
int proto;
|
||||
+ u_int32_t newip;
|
||||
{
|
||||
struct packet *pkt, *prev, *nextpkt;
|
||||
+ unsigned short checksum;
|
||||
+ unsigned short pkt_checksum = 0;
|
||||
+ unsigned iphdr;
|
||||
+ struct timeval tv;
|
||||
+ char cv = 0;
|
||||
+ char ipstr[16];
|
||||
|
||||
prev = NULL;
|
||||
pkt = pend_q;
|
||||
pend_q = NULL;
|
||||
+ tv.tv_sec = 1;
|
||||
+ tv.tv_usec = 0;
|
||||
+ select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */
|
||||
for (; pkt != NULL; pkt = nextpkt) {
|
||||
nextpkt = pkt->next;
|
||||
if (PPP_PROTOCOL(pkt->data) == proto) {
|
||||
+ if ( (proto == PPP_IP) && newip ) {
|
||||
+ /* Get old checksum */
|
||||
+
|
||||
+ iphdr = (pkt->data[4] & 15) << 2;
|
||||
+ checksum = *((unsigned short *) (pkt->data+14));
|
||||
+ if (checksum == 0xFFFF) {
|
||||
+ checksum = 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (pkt->data[13] == 17) {
|
||||
+ pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr));
|
||||
+ if (pkt_checksum) {
|
||||
+ cv = 1;
|
||||
+ if (pkt_checksum == 0xFFFF) {
|
||||
+ pkt_checksum = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ cv = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (pkt->data[13] == 6) {
|
||||
+ pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr));
|
||||
+ cv = 1;
|
||||
+ if (pkt_checksum == 0xFFFF) {
|
||||
+ pkt_checksum = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Delete old Source-IP-Address */
|
||||
+ checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF;
|
||||
+ checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF;
|
||||
+
|
||||
+ pkt_checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF;
|
||||
+ pkt_checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF;
|
||||
+
|
||||
+ /* Change Source-IP-Address */
|
||||
+ * ((u_int32_t *) (pkt->data + 16)) = newip;
|
||||
+
|
||||
+ /* Add new Source-IP-Address */
|
||||
+ checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF;
|
||||
+ checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF;
|
||||
+
|
||||
+ pkt_checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF;
|
||||
+ pkt_checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF;
|
||||
+
|
||||
+ /* Write new checksum */
|
||||
+ if (!checksum) {
|
||||
+ checksum = 0xFFFF;
|
||||
+ }
|
||||
+ *((unsigned short *) (pkt->data+14)) = checksum;
|
||||
+ if (pkt->data[13] == 6) {
|
||||
+ *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum;
|
||||
+ }
|
||||
+ if (cv && (pkt->data[13] == 17) ) {
|
||||
+ *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum;
|
||||
+ }
|
||||
+
|
||||
+ /* Log Packet */
|
||||
+ strcpy(ipstr,inet_ntoa(*( (struct in_addr *) (pkt->data+16))));
|
||||
+ if (pkt->data[13] == 1) {
|
||||
+ syslog(LOG_INFO,"Open ICMP %s -> %s\n",
|
||||
+ ipstr,
|
||||
+ inet_ntoa(*( (struct in_addr *) (pkt->data+20))));
|
||||
+ } else {
|
||||
+ syslog(LOG_INFO,"Open %s %s:%d -> %s:%d\n",
|
||||
+ pkt->data[13] == 6 ? "TCP" : "UDP",
|
||||
+ ipstr,
|
||||
+ ntohs(*( (short *) (pkt->data+iphdr+4))),
|
||||
+ inet_ntoa(*( (struct in_addr *) (pkt->data+20))),
|
||||
+ ntohs(*( (short *) (pkt->data+iphdr+6))));
|
||||
+ }
|
||||
+ }
|
||||
output(0, pkt->data, pkt->length);
|
||||
free(pkt);
|
||||
} else {
|
||||
--- ppp/pppd/ipcp.c
|
||||
+++ ppp/pppd/ipcp.c 2000/06/28 12:32:05
|
||||
@@ -1454,7 +1454,7 @@
|
||||
proxy_arp_set[f->unit] = 1;
|
||||
|
||||
}
|
||||
- demand_rexmit(PPP_IP);
|
||||
+ demand_rexmit(PPP_IP,go->ouraddr);
|
||||
sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
|
||||
|
||||
} else {
|
||||
--- ppp/pppd/ipv6cp.c
|
||||
+++ ppp/pppd/ipv6cp.c 2000/06/28 12:32:06
|
||||
@@ -1153,7 +1153,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
- demand_rexmit(PPP_IPV6);
|
||||
+ demand_rexmit(PPP_IPV6,0);
|
||||
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);
|
||||
|
||||
} else {
|
||||
--- ppp/pppd/pppd.h
|
||||
+++ ppp/pppd/pppd.h 2000/06/28 12:32:06
|
||||
@@ -359,7 +359,7 @@
|
||||
void demand_block __P((void)); /* set all NPs to queue up packets */
|
||||
void demand_unblock __P((void)); /* set all NPs to pass packets */
|
||||
void demand_discard __P((void)); /* set all NPs to discard packets */
|
||||
-void demand_rexmit __P((int)); /* retransmit saved frames for an NP */
|
||||
+void demand_rexmit __P((int, u_int32_t)); /* retransmit saved frames for an NP*/
|
||||
int loop_chars __P((unsigned char *, int)); /* process chars from loopback */
|
||||
int loop_frame __P((unsigned char *, int)); /* should we bring link up? */
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -ur ppp-2.4.2.old/pppd/main.c ppp-2.4.2/pppd/main.c
|
||||
--- ppp-2.4.2.old/pppd/main.c 2004-01-13 04:00:34.000000000 +0000
|
||||
+++ ppp-2.4.2/pppd/main.c 2004-05-24 19:05:34.000000000 +0100
|
||||
@@ -1662,8 +1648,11 @@
|
||||
|
||||
/* Ensure that nothing of our device environment is inherited. */
|
||||
closelog();
|
||||
+ /* Some plugins dont have a close function, so just close the devfd */
|
||||
if (the_channel->close)
|
||||
(*the_channel->close)();
|
||||
+ else
|
||||
+ close(devfd);
|
||||
|
||||
/* Don't pass handles to the PPP device, even by accident. */
|
||||
dup2(fd_devnull, 0);
|
||||
@@ -1,13 +0,0 @@
|
||||
diff -ruN ppp.orig/pppd/plugins/pppoatm.c ppp/pppd/plugins/pppoatm.c
|
||||
--- ppp.orig/pppd/plugins/pppoatm.c 2003-10-17 22:03:40.000000000 +0200
|
||||
+++ ppp/pppd/plugins/pppoatm.c 2003-10-17 22:03:27.000000000 +0200
|
||||
@@ -148,7 +148,9 @@
|
||||
int fd;
|
||||
struct atm_qos qos;
|
||||
|
||||
+/*
|
||||
system ("/sbin/modprobe pppoatm");
|
||||
+*/
|
||||
|
||||
if (!device_got_set)
|
||||
no_device_given_pppoatm();
|
||||
@@ -1,36 +0,0 @@
|
||||
--- ppp/pppd/plugins/pppoatm.c~ 2003-07-19 15:35:24.000000000 +0200
|
||||
+++ ppp/pppd/plugins/pppoatm.c 2003-07-19 15:42:26.000000000 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
static bool vc_encaps = 0;
|
||||
static int device_got_set = 0;
|
||||
static int pppoatm_max_mtu, pppoatm_max_mru;
|
||||
+static int pppoatmfd = -1;
|
||||
static int setdevname_pppoatm(const char *cp, const char **argv, int doit);
|
||||
struct channel pppoa_channel;
|
||||
|
||||
@@ -173,9 +174,16 @@
|
||||
pppoatm_max_mru = lcp_wantoptions[0].mru;
|
||||
set_line_discipline_pppoatm(fd);
|
||||
strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam));
|
||||
+ pppoatmfd = fd; /* need to save it for disconnect */
|
||||
return fd;
|
||||
}
|
||||
|
||||
+static void disconnect_pppoatm(void)
|
||||
+{
|
||||
+ close(pppoatmfd);
|
||||
+ pppoatmfd = -1;
|
||||
+}
|
||||
+
|
||||
static void send_config_pppoa(int mtu,
|
||||
u_int32_t asyncmap,
|
||||
int pcomp,
|
||||
@@ -222,7 +230,7 @@
|
||||
process_extra_options: NULL,
|
||||
check_options: NULL,
|
||||
connect: &connect_pppoatm,
|
||||
- disconnect: NULL,
|
||||
+ disconnect: &disconnect_pppoatm,
|
||||
establish_ppp: &generic_establish_ppp,
|
||||
disestablish_ppp: &generic_disestablish_ppp,
|
||||
send_config: &send_config_pppoa,
|
||||
@@ -1,284 +0,0 @@
|
||||
diff -u -r -N a/ppp/pppd/plugins/Makefile.linux ppp/pppd/plugins/Makefile.linux
|
||||
--- a/ppp/pppd/plugins/Makefile.linux 2003-02-16 23:31:24.000000000 +0100
|
||||
+++ b/pppd/plugins/Makefile.linux 2003-07-01 11:39:05.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
SUBDIRS := rp-pppoe
|
||||
# Uncomment the next line to include the radius authentication plugin
|
||||
# SUBDIRS += radius
|
||||
-PLUGINS := minconn.so passprompt.so passwordfd.so
|
||||
+PLUGINS := minconn.so passprompt.so passwordfd.so pppoatm.so
|
||||
|
||||
# include dependencies if present
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
@@ -16,6 +16,9 @@
|
||||
all: $(PLUGINS)
|
||||
for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
|
||||
|
||||
+pppoatm.so: pppoatm.c
|
||||
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ -latm -lresolv
|
||||
+
|
||||
%.so: %.c
|
||||
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
|
||||
|
||||
diff -u -r -N a/ppp/pppd/plugins/pppoatm.c ppp/pppd/plugins/pppoatm.c
|
||||
--- /dev/null 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/pppd/plugins/pppoatm.c 2003-07-01 11:39:37.000000000 +0200
|
||||
@@ -0,0 +1,232 @@
|
||||
+/* pppoatm.c - pppd plugin to implement PPPoATM protocol.
|
||||
+ *
|
||||
+ * Copyright 2000 Mitchell Blank Jr.
|
||||
+ * Based in part on work from Jens Axboe and Paul Mackerras.
|
||||
+ * Updated to ppp-2.4.1 by Bernhard Kaindl
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
+ */
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+#include "pppd.h"
|
||||
+#include "pathnames.h"
|
||||
+#include "fsm.h" /* Needed for lcp.h to include cleanly */
|
||||
+#include "lcp.h"
|
||||
+#include <atm.h>
|
||||
+#include <linux/atmdev.h>
|
||||
+#include <linux/atmppp.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <net/if.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+
|
||||
+const char pppd_version[] = VERSION;
|
||||
+
|
||||
+static struct sockaddr_atmpvc pvcaddr;
|
||||
+static char *qosstr = NULL;
|
||||
+/* static int pppoatm_accept = 0; */
|
||||
+static bool llc_encaps = 0;
|
||||
+static bool vc_encaps = 0;
|
||||
+static int device_got_set = 0;
|
||||
+static int pppoatm_max_mtu, pppoatm_max_mru;
|
||||
+static int setdevname_pppoatm(const char *cp, const char **argv, int doit);
|
||||
+struct channel pppoa_channel;
|
||||
+
|
||||
+static option_t pppoa_options[] = {
|
||||
+ { "device name", o_wild, (void *) &setdevname_pppoatm,
|
||||
+ "ATM service provider IDs: VPI.VCI",
|
||||
+ OPT_DEVNAM | OPT_PRIVFIX | OPT_NOARG | OPT_A2STRVAL | OPT_STATIC,
|
||||
+ devnam},
|
||||
+#if 0
|
||||
+ { "accept", o_bool, &pppoatm_accept,
|
||||
+ "set PPPoATM socket to accept incoming connections", 1 },
|
||||
+#endif
|
||||
+ { "llc-encaps", o_bool, &llc_encaps,
|
||||
+ "use LLC encapsulation for PPPoATM", 1},
|
||||
+ { "vc-encaps", o_bool, &vc_encaps,
|
||||
+ "use VC multiplexing for PPPoATM (default)", 1},
|
||||
+ { "qos", o_string, &qosstr,
|
||||
+ "set QoS for PPPoATM connection", 1},
|
||||
+ { NULL }
|
||||
+};
|
||||
+
|
||||
+/* returns:
|
||||
+ * -1 if there's a problem with setting the device
|
||||
+ * 0 if we can't parse "cp" as a valid name of a device
|
||||
+ * 1 if "cp" is a reasonable thing to name a device
|
||||
+ * Note that we don't actually open the device at this point
|
||||
+ * We do need to fill in:
|
||||
+ * devnam: a string representation of the device
|
||||
+ * devstat: a stat structure of the device. In this case
|
||||
+ * we're not opening a device, so we just make sure
|
||||
+ * to set up S_ISCHR(devstat.st_mode) != 1, so we
|
||||
+ * don't get confused that we're on stdin.
|
||||
+ */
|
||||
+int (*old_setdevname_hook)(const char* cp) = NULL;
|
||||
+static int setdevname_pppoatm(const char *cp, const char **argv, int doit)
|
||||
+{
|
||||
+ struct sockaddr_atmpvc addr;
|
||||
+ extern struct stat devstat;
|
||||
+ if (device_got_set)
|
||||
+ return 0;
|
||||
+ //info("PPPoATM setdevname_pppoatm: '%s'", cp);
|
||||
+ memset(&addr, 0, sizeof addr);
|
||||
+ if (text2atm(cp, (struct sockaddr *) &addr, sizeof(addr),
|
||||
+ T2A_PVC | T2A_NAME) < 0) {
|
||||
+ if(doit)
|
||||
+ info("atm does not recognize: %s", cp);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (!doit) return 1;
|
||||
+ //if (!dev_set_ok()) return -1;
|
||||
+ memcpy(&pvcaddr, &addr, sizeof pvcaddr);
|
||||
+ strlcpy(devnam, cp, sizeof devnam);
|
||||
+ devstat.st_mode = S_IFSOCK;
|
||||
+ if (the_channel != &pppoa_channel) {
|
||||
+ static char *bad_options[] = {
|
||||
+ "noaccomp", "-ac",
|
||||
+ "default-asyncmap", "-am", "asyncmap", "-as", "escape",
|
||||
+ "receive-all",
|
||||
+ "crtscts", "-crtscts", "nocrtscts",
|
||||
+ "cdtrcts", "nocdtrcts",
|
||||
+ "xonxoff",
|
||||
+ "modem", "local", "sync",
|
||||
+ NULL };
|
||||
+ char **a;
|
||||
+ the_channel = &pppoa_channel;
|
||||
+ info("PPPoATM setdevname - remove unwanted options");
|
||||
+ for (a = bad_options; *a != NULL; a++)
|
||||
+ remove_option(*a);
|
||||
+ modem = 0;
|
||||
+ lcp_wantoptions[0].neg_accompression = 0;
|
||||
+ lcp_allowoptions[0].neg_accompression = 0;
|
||||
+ lcp_wantoptions[0].neg_asyncmap = 0;
|
||||
+ lcp_allowoptions[0].neg_asyncmap = 0;
|
||||
+ lcp_wantoptions[0].neg_pcompression = 0;
|
||||
+ }
|
||||
+ info("PPPoATM setdevname_pppoatm - SUCCESS:%s", cp);
|
||||
+ device_got_set = 1;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+#define pppoatm_overhead() (llc_encaps ? 6 : 2)
|
||||
+
|
||||
+static void no_device_given_pppoatm(void)
|
||||
+{
|
||||
+ fatal("No vpi.vci specified");
|
||||
+}
|
||||
+
|
||||
+static void set_line_discipline_pppoatm(int fd)
|
||||
+{
|
||||
+ struct atm_backend_ppp be;
|
||||
+ be.backend_num = ATM_BACKEND_PPP;
|
||||
+ if (!llc_encaps)
|
||||
+ be.encaps = PPPOATM_ENCAPS_VC;
|
||||
+ else if (!vc_encaps)
|
||||
+ be.encaps = PPPOATM_ENCAPS_LLC;
|
||||
+ else
|
||||
+ be.encaps = PPPOATM_ENCAPS_AUTODETECT;
|
||||
+ if (ioctl(fd, ATM_SETBACKEND, &be) < 0)
|
||||
+ fatal("ioctl(ATM_SETBACKEND): %m");
|
||||
+}
|
||||
+
|
||||
+#if 0
|
||||
+static void reset_line_discipline_pppoatm(int fd)
|
||||
+{
|
||||
+ atm_backend_t be = ATM_BACKEND_RAW;
|
||||
+ /* 2.4 doesn't support this yet */
|
||||
+ (void) ioctl(fd, ATM_SETBACKEND, &be);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static int connect_pppoatm(void)
|
||||
+{
|
||||
+ int fd;
|
||||
+ struct atm_qos qos;
|
||||
+
|
||||
+ system ("/sbin/modprobe pppoatm");
|
||||
+
|
||||
+ if (!device_got_set)
|
||||
+ no_device_given_pppoatm();
|
||||
+ fd = socket(AF_ATMPVC, SOCK_DGRAM, 0);
|
||||
+ if (fd < 0)
|
||||
+ fatal("failed to create socket: %m");
|
||||
+ memset(&qos, 0, sizeof qos);
|
||||
+ qos.txtp.traffic_class = qos.rxtp.traffic_class = ATM_UBR;
|
||||
+ /* TODO: support simplified QoS setting */
|
||||
+ if (qosstr != NULL)
|
||||
+ if (text2qos(qosstr, &qos, 0))
|
||||
+ fatal("Can't parse QoS: \"%s\"");
|
||||
+ qos.txtp.max_sdu = lcp_allowoptions[0].mru + pppoatm_overhead();
|
||||
+ qos.rxtp.max_sdu = lcp_wantoptions[0].mru + pppoatm_overhead();
|
||||
+ qos.aal = ATM_AAL5;
|
||||
+ if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0)
|
||||
+ fatal("setsockopt(SO_ATMQOS): %m");
|
||||
+ /* TODO: accept on SVCs... */
|
||||
+ if (connect(fd, (struct sockaddr *) &pvcaddr,
|
||||
+ sizeof(struct sockaddr_atmpvc)))
|
||||
+ fatal("connect(%s): %m", devnam);
|
||||
+ pppoatm_max_mtu = lcp_allowoptions[0].mru;
|
||||
+ pppoatm_max_mru = lcp_wantoptions[0].mru;
|
||||
+ set_line_discipline_pppoatm(fd);
|
||||
+ strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam));
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+static void send_config_pppoa(int mtu,
|
||||
+ u_int32_t asyncmap,
|
||||
+ int pcomp,
|
||||
+ int accomp)
|
||||
+{
|
||||
+ int sock;
|
||||
+ struct ifreq ifr;
|
||||
+ if (mtu > pppoatm_max_mtu)
|
||||
+ error("Couldn't increase MTU to %d", mtu);
|
||||
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ if (sock < 0)
|
||||
+ fatal("Couldn't create IP socket: %m");
|
||||
+ strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
||||
+ ifr.ifr_mtu = mtu;
|
||||
+ if (ioctl(sock, SIOCSIFMTU, (caddr_t) &ifr) < 0)
|
||||
+ fatal("ioctl(SIOCSIFMTU): %m");
|
||||
+ (void) close (sock);
|
||||
+}
|
||||
+
|
||||
+static void recv_config_pppoa(int mru,
|
||||
+ u_int32_t asyncmap,
|
||||
+ int pcomp,
|
||||
+ int accomp)
|
||||
+{
|
||||
+ if (mru > pppoatm_max_mru)
|
||||
+ error("Couldn't increase MRU to %d", mru);
|
||||
+}
|
||||
+
|
||||
+void plugin_init(void)
|
||||
+{
|
||||
+#if defined(__linux__)
|
||||
+ extern int new_style_driver; /* From sys-linux.c */
|
||||
+ if (!ppp_available() && !new_style_driver)
|
||||
+ fatal("Kernel doesn't support ppp_generic - "
|
||||
+ "needed for PPPoATM");
|
||||
+#else
|
||||
+ fatal("No PPPoATM support on this OS");
|
||||
+#endif
|
||||
+ info("PPPoATM plugin_init");
|
||||
+ add_options(pppoa_options);
|
||||
+}
|
||||
+struct channel pppoa_channel = {
|
||||
+ options: pppoa_options,
|
||||
+ process_extra_options: NULL,
|
||||
+ check_options: NULL,
|
||||
+ connect: &connect_pppoatm,
|
||||
+ disconnect: NULL,
|
||||
+ establish_ppp: &generic_establish_ppp,
|
||||
+ disestablish_ppp: &generic_disestablish_ppp,
|
||||
+ send_config: &send_config_pppoa,
|
||||
+ recv_config: &recv_config_pppoa,
|
||||
+ close: NULL,
|
||||
+ cleanup: NULL
|
||||
+};
|
||||
diff -u -r -N a/ppp/pppd/options.c ppp/pppd/options.c
|
||||
--- a/ppp/pppd/options.c 2003-03-03 06:11:46.000000000 +0100
|
||||
+++ b/pppd/options.c 2003-07-01 11:17:12.000000000 +0200
|
||||
@@ -843,6 +843,22 @@
|
||||
}
|
||||
|
||||
/*
|
||||
+ * remove_option - permanently remove an option from consideration...
|
||||
+ * for use by modules to remove choices which no longer make sense.
|
||||
+ * returns true if found an option
|
||||
+ */
|
||||
+int remove_option(const char *name)
|
||||
+{
|
||||
+ option_t *o;
|
||||
+
|
||||
+ o = find_option(name);
|
||||
+ if (o == NULL)
|
||||
+ return 0;
|
||||
+ o->name = "";
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* check_options - check that options are valid and consistent.
|
||||
*/
|
||||
void
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -ruN ppp-2.4.2.old/pppd/main.c ppp-2.4.2/pppd/main.c
|
||||
--- ppp-2.4.2.old/pppd/main.c 2004-01-13 05:00:34.000000000 +0100
|
||||
+++ ppp-2.4.2/pppd/main.c 2004-02-19 14:41:23.000000000 +0100
|
||||
@@ -1127,7 +1127,6 @@
|
||||
die(status)
|
||||
int status;
|
||||
{
|
||||
- print_link_stats();
|
||||
cleanup();
|
||||
notify(exitnotify, status);
|
||||
syslog(LOG_INFO, "Exit.");
|
||||
@@ -1,13 +0,0 @@
|
||||
diff -ruN ppp-2.4.2.old/pppd/main.c ppp-2.4.2/pppd/main.c
|
||||
--- ppp-2.4.2.old/pppd/main.c 2004-01-13 05:00:34.000000000 +0100
|
||||
+++ ppp-2.4.2/pppd/main.c 2004-02-19 13:41:17.000000000 +0100
|
||||
@@ -1338,8 +1338,8 @@
|
||||
|
||||
act.sa_handler = SIG_IGN;
|
||||
act.sa_flags = 0;
|
||||
- sigaction(sig, &act, &oldact);
|
||||
kill(0, sig);
|
||||
+ sigaction(sig, &act, &oldact);
|
||||
sigaction(sig, &oldact, NULL);
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
diff -urN linux-2.5/drivers/net/ppp_generic.c pmac-2.5/drivers/net/ppp_generic.c
|
||||
--- linux-2.5/drivers/net/ppp_generic.c 2004-10-29 07:03:21.000000000 +1000
|
||||
+++ pmac-2.5/drivers/net/ppp_generic.c 2004-11-15 08:53:54.000000000 +1100
|
||||
@@ -19,7 +19,7 @@
|
||||
* PPP driver, written by Michael Callahan and Al Longyear, and
|
||||
* subsequently hacked by Paul Mackerras.
|
||||
*
|
||||
- * ==FILEVERSION 20020217==
|
||||
+ * ==FILEVERSION 20041108==
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
@@ -412,6 +412,17 @@
|
||||
ret = 0;
|
||||
if (pf->dead)
|
||||
break;
|
||||
+ if (pf->kind == INTERFACE) {
|
||||
+ /*
|
||||
+ * Return 0 (EOF) on an interface that has no
|
||||
+ * channels connected, unless it is looping
|
||||
+ * network traffic (demand mode).
|
||||
+ */
|
||||
+ struct ppp *ppp = PF_TO_PPP(pf);
|
||||
+ if (ppp->n_channels == 0
|
||||
+ && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
|
||||
+ break;
|
||||
+ }
|
||||
ret = -EAGAIN;
|
||||
if (file->f_flags & O_NONBLOCK)
|
||||
break;
|
||||
@@ -491,6 +502,14 @@
|
||||
mask |= POLLIN | POLLRDNORM;
|
||||
if (pf->dead)
|
||||
mask |= POLLHUP;
|
||||
+ else if (pf->kind == INTERFACE) {
|
||||
+ /* see comment in ppp_read */
|
||||
+ struct ppp *ppp = PF_TO_PPP(pf);
|
||||
+ if (ppp->n_channels == 0
|
||||
+ && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
|
||||
+ mask |= POLLIN | POLLRDNORM;
|
||||
+ }
|
||||
+
|
||||
return mask;
|
||||
}
|
||||
|
||||
@@ -2559,7 +2578,8 @@
|
||||
/* remove it from the ppp unit's list */
|
||||
ppp_lock(ppp);
|
||||
list_del(&pch->clist);
|
||||
- --ppp->n_channels;
|
||||
+ if (--ppp->n_channels == 0)
|
||||
+ wake_up_interruptible(&ppp->file.rwait);
|
||||
ppp_unlock(ppp);
|
||||
if (atomic_dec_and_test(&ppp->file.refcnt))
|
||||
ppp_destroy_interface(ppp);
|
||||
@@ -1,22 +0,0 @@
|
||||
# This is a BitKeeper generated diff -Nru style patch.
|
||||
#
|
||||
# ChangeSet
|
||||
# 2004/06/01 02:58:12+02:00 kaber@trash.net
|
||||
# [NETFILTER]: Change permissions of /proc/net/ip_conntrack to 0440
|
||||
#
|
||||
# net/ipv4/netfilter/ip_conntrack_standalone.c
|
||||
# 2004/06/01 02:58:02+02:00 kaber@trash.net +1 -1
|
||||
# [NETFILTER]: Change permissions of /proc/net/ip_conntrack to 0440
|
||||
#
|
||||
diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
|
||||
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-02 03:23:39 +02:00
|
||||
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-02 03:23:39 +02:00
|
||||
@@ -502,7 +502,7 @@
|
||||
if (ret < 0)
|
||||
goto cleanup_nothing;
|
||||
|
||||
- proc = proc_net_create("ip_conntrack",0,list_conntracks);
|
||||
+ proc = proc_net_create("ip_conntrack", 0440, list_conntracks);
|
||||
if (!proc) goto cleanup_init;
|
||||
proc->owner = THIS_MODULE;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,51 +0,0 @@
|
||||
diff -urN squidGuard-1.2.0_orig/configure.in squidGuard-1.2.0/configure.in
|
||||
--- squidGuard-1.2.0_orig/configure.in 2001-12-18 10:16:36.000000000 +0000
|
||||
+++ squidGuard-1.2.0/configure.in 2006-06-10 12:29:26.000000000 +0000
|
||||
@@ -71,7 +71,12 @@
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
-AC_CHECK_LIB(db,db_version,,[
|
||||
+AC_CHECK_LIB(db,db_version,,
|
||||
+AC_CHECK_LIB(db,db_version_4000,,
|
||||
+AC_CHECK_LIB(db,db_version_4001,,
|
||||
+AC_CHECK_LIB(db,db_version_4002,,
|
||||
+AC_CHECK_LIB(db,db_version_4003,,
|
||||
+AC_CHECK_LIB(db,db_version_4004,,[
|
||||
echo
|
||||
echo "** The Berkley DB library is required for squidGuard"
|
||||
echo " to compile. Get it from http://www.sleepycat.com"
|
||||
@@ -79,7 +84,7 @@
|
||||
echo " its location. (default is $dbprefix/BerkeleyDB)"
|
||||
echo
|
||||
exit 1
|
||||
- ])
|
||||
+ ]))))))
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
diff -urN squidGuard-1.2.0_orig/src/sgDb.c squidGuard-1.2.0/src/sgDb.c
|
||||
--- squidGuard-1.2.0_orig/src/sgDb.c 2001-05-14 13:40:12.000000000 +0000
|
||||
+++ squidGuard-1.2.0/src/sgDb.c 2006-06-10 12:27:04.000000000 +0000
|
||||
@@ -98,13 +98,21 @@
|
||||
if(createdb)
|
||||
flag = flag | DB_TRUNCATE;
|
||||
if ((ret =
|
||||
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
|
||||
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
|
||||
+#else
|
||||
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
|
||||
+#endif
|
||||
(void) Db->dbp->close(Db->dbp, 0);
|
||||
sgLogFatalError("Error db_open: %s", strerror(ret));
|
||||
}
|
||||
} else {
|
||||
if ((ret =
|
||||
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
|
||||
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
|
||||
+#else
|
||||
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
|
||||
+#endif
|
||||
sgLogFatalError("Error db_open: %s", strerror(ret));
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
borrowed from gentoo
|
||||
--- syslinux/com32/libutil/Makefile
|
||||
+++ syslinux/com32/libutil/Makefile
|
||||
@@ -40,7 +40,7 @@
|
||||
AR = ar
|
||||
NASM = nasm
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,)
|
||||
+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-nopie,)
|
||||
SFLAGS = $(M32) -D__COM32__ -march=i386
|
||||
LDFLAGS = -T ../lib/com32.ld
|
||||
LNXCFLAGS = -I./include -W -Wall -fno-stack-protector -O -g
|
||||
--- syslinux/dos/Makefile
|
||||
+++ syslinux/dos/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
OBJCOPY = objcopy
|
||||
OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
|
||||
INCLUDES = -include code16.h -I. -I.. -I../libfat
|
||||
-CFLAGS = -W -Wall -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
|
||||
+CFLAGS = -W -Wall -nopie -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
|
||||
LDFLAGS = -T com16.ld
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
@@ -1,173 +0,0 @@
|
||||
borrowed from gentoo
|
||||
--- syslinux/Makefile
|
||||
+++ syslinux/Makefile
|
||||
@@ -18,7 +18,7 @@
|
||||
OSTYPE = $(shell uname -msr)
|
||||
CC = gcc
|
||||
INCLUDE =
|
||||
-CFLAGS = -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
PIC = -fPIC
|
||||
LDFLAGS = -O2 -s
|
||||
AR = ar
|
||||
@@ -194,9 +194,8 @@ libsyslinux.a: bootsect_bin.o ldlinux_bi
|
||||
$(LIB_SO): bootsect_bin.o ldlinux_bin.o syslxmod.o
|
||||
$(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIB_SONAME) -o $@ $^
|
||||
|
||||
-gethostip.o: gethostip.c
|
||||
-
|
||||
-gethostip: gethostip.o
|
||||
+gethostip: gethostip.c
|
||||
+ $(CC) $(LDFLAGS) gethostip.c -o gethostip -fno-stack-protector
|
||||
|
||||
mkdiskimage: mkdiskimage.in mbr.bin bin2hex.pl
|
||||
$(PERL) bin2hex.pl < mbr.bin | cat mkdiskimage.in - > $@
|
||||
--- syslinux/com32/lib/MCONFIG
|
||||
+++ syslinux/com32/lib/MCONFIG
|
||||
@@ -18,7 +18,7 @@ LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_
|
||||
|
||||
REQFLAGS = -g -m32 -mregparm=3 -DREGPARM=3 -D__COM32__ -I. -I./sys -I../include
|
||||
OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \
|
||||
- -falign-labels=0
|
||||
+ -falign-labels=0 -fno-stack-protector
|
||||
WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
|
||||
|
||||
CFLAGS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d $(OPTFLAGS) \
|
||||
--- syslinux/com32/libutil/Makefile
|
||||
+++ syslinux/com32/libutil/Makefile
|
||||
@@ -40,10 +40,10 @@ LD = ld -m elf_i386
|
||||
AR = ar
|
||||
NASM = nasm
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include
|
||||
+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,)
|
||||
SFLAGS = $(M32) -D__COM32__ -march=i386
|
||||
LDFLAGS = -T ../lib/com32.ld
|
||||
-LNXCFLAGS = -I./include -W -Wall -O -g
|
||||
+LNXCFLAGS = -I./include -W -Wall -O -g $(call gcc_ok,-fno-stack-protector,)
|
||||
LNXSFLAGS = -g
|
||||
LNXLDFLAGS = -g
|
||||
OBJCOPY = objcopy
|
||||
--- syslinux/com32/modules/Makefile
|
||||
+++ syslinux/com32/modules/Makefile
|
||||
@@ -25,8 +25,8 @@ LD = ld -m elf_i386
|
||||
AR = ar
|
||||
NASM = nasm
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__
|
||||
-LNXCFLAGS = -W -Wall -O -g -I../libutil/include
|
||||
+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ $(call gcc_ok,-fno-stack-protector,)
|
||||
+LNXCFLAGS = -W -Wall -O -g -I../libutil/include $(call gcc_ok,-fno-stack-protector,)
|
||||
LNXSFLAGS = -g
|
||||
LNXLDFLAGS = -g
|
||||
SFLAGS = -D__COM32__ -march=i386
|
||||
--- syslinux/com32/samples/Makefile
|
||||
+++ syslinux/com32/samples/Makefile
|
||||
@@ -25,8 +25,8 @@ LD = ld -m elf_i386
|
||||
AR = ar
|
||||
NASM = nasm
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__
|
||||
-LNXCFLAGS = -W -Wall -O -g -I../libutil/include
|
||||
+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ $(call gcc_ok,-fno-stack-protector,)
|
||||
+LNXCFLAGS = -W -Wall -O -g -I../libutil/include $(call gcc_ok,-fno-stack-protector,)
|
||||
LNXSFLAGS = -g
|
||||
LNXLDFLAGS = -g
|
||||
SFLAGS = -D__COM32__ -march=i386
|
||||
--- syslinux/dos/Makefile
|
||||
+++ syslinux/dos/Makefile
|
||||
@@ -3,7 +3,7 @@ LD = ld -m elf_i386
|
||||
OBJCOPY = objcopy
|
||||
OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
|
||||
INCLUDES = -include code16.h -I. -I.. -I../libfat
|
||||
-CFLAGS = -W -Wall -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
|
||||
LDFLAGS = -T com16.ld
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
--- syslinux/extlinux/Makefile
|
||||
+++ syslinux/extlinux/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
CC = gcc
|
||||
OPTFLAGS = -g -Os
|
||||
INCLUDES = -I. -I.. -I../libfat
|
||||
-CFLAGS = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -Wno-sign-compare -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
LDFLAGS = -s
|
||||
|
||||
SRCS = extlinux.c ../extlinux_bss_bin.c ../extlinux_sys_bin.c
|
||||
--- syslinux/memdisk/Makefile
|
||||
+++ syslinux/memdisk/Makefile
|
||||
@@ -20,7 +20,7 @@ M32 := $(call gcc_ok,-m32,)
|
||||
FREE := $(call gcc_ok,-ffreestanding,)
|
||||
|
||||
CC = gcc $(M32) $(FREE)
|
||||
-CFLAGS = -g -W -Wall -Wno-sign-compare \
|
||||
+CFLAGS = -g -W -Wall -Wno-sign-compare $(call gcc_ok,-fno-stack-protector,) \
|
||||
-Os -fomit-frame-pointer -march=i386 $(ALIGN) \
|
||||
-DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
|
||||
LDFLAGS = -g
|
||||
--- syslinux/menu/Makefile
|
||||
+++ syslinux/menu/Makefile
|
||||
@@ -5,7 +5,7 @@ M32 := $(call gcc_ok,-m32,)
|
||||
COM32DIR = ../com32
|
||||
LUDIR = $(COM32DIR)/libutil
|
||||
LDIR = $(COM32DIR)/lib
|
||||
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I$(LUDIR)/include -I$(COM32DIR)/include -Ilibmenu -D__COM32__
|
||||
+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I$(LUDIR)/include -I$(COM32DIR)/include -Ilibmenu -D__COM32__ $(call gcc_ok,-fno-stack-protector,)
|
||||
SFLAGS = -D__COM32__ -march=i386
|
||||
LDFLAGS = -T $(LDIR)/com32.ld
|
||||
OBJCOPY = objcopy
|
||||
--- syslinux/mtools/Makefile
|
||||
+++ syslinux/mtools/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
CC = gcc
|
||||
OPTFLAGS = -g -Os
|
||||
INCLUDES = -I. -I.. -I../libfat
|
||||
-CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
LDFLAGS = -s
|
||||
|
||||
SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
|
||||
--- syslinux/sample/Makefile
|
||||
+++ syslinux/sample/Makefile
|
||||
@@ -25,7 +25,7 @@ LD = ld -m elf_i386
|
||||
AR = ar
|
||||
NASM = nasm
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include
|
||||
+CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include $(call gcc_ok,-fno-stack-protector,)
|
||||
SFLAGS = -march=i386
|
||||
LDFLAGS = -s
|
||||
OBJCOPY = objcopy
|
||||
--- syslinux/unix/Makefile
|
||||
+++ syslinux/unix/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
CC = gcc
|
||||
OPTFLAGS = -g -Os
|
||||
INCLUDES = -I. -I.. -I../libfat
|
||||
-CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||
LDFLAGS = -s
|
||||
|
||||
SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
|
||||
--- syslinux/win32/Makefile
|
||||
+++ syslinux/win32/Makefile
|
||||
@@ -23,7 +23,7 @@ ifeq ($(findstring CYGWIN,$(OSTYPE)),CYG
|
||||
CC = gcc
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
-CFLAGS = -mno-cygwin -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -mno-cygwin -W -Wall -fno-stack-protector -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
PIC =
|
||||
LDFLAGS = -mno-cygwin -Os -s
|
||||
else
|
||||
@@ -37,7 +37,7 @@ AR = mingw-ar
|
||||
RANLIB = mingw-ranlib
|
||||
endif
|
||||
|
||||
-CFLAGS = -W -Wall -Wno-sign-compare -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
+CFLAGS = -W -Wall -fno-stack-protector -Wno-sign-compare -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
|
||||
PIC =
|
||||
LDFLAGS = -Os -s
|
||||
endif
|
||||
@@ -1,11 +0,0 @@
|
||||
--- Makefile.bak 2006-10-24 00:56:23.000000000 +0000
|
||||
+++ Makefile 2006-10-23 19:57:49.000000000 +0000
|
||||
@@ -32,7 +32,7 @@
|
||||
./gen_wc8bit `cat codesets.txt`
|
||||
|
||||
gen_wctype: gen_wctype.c
|
||||
- $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) -D__UCLIBC_GEN_LOCALE $^ -o $@
|
||||
+ $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) -O1 -D__UCLIBC_GEN_LOCALE $^ -o $@
|
||||
|
||||
# Warning! Beware tr_TR toupper/tolower exceptions!
|
||||
wctables.h: gen_wctype
|
||||
@@ -1,62 +0,0 @@
|
||||
diff -Naur v4l-dvb-4c4fd6b8755c.org/linux/drivers/media/video/videodev.c v4l-dvb/linux/drivers/media/video/videodev.c
|
||||
--- v4l-dvb-4c4fd6b8755c.org/linux/drivers/media/video/videodev.c 2008-05-02 12:51:27.000000000 +0200
|
||||
+++ v4l-dvb/linux/drivers/media/video/videodev.c 2008-05-10 14:40:07.000000000 +0200
|
||||
@@ -492,7 +492,7 @@
|
||||
|
||||
static struct class video_class = {
|
||||
.name = VIDEO_NAME,
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
.release = video_release,
|
||||
#else
|
||||
.dev_attrs = video_device_attrs,
|
||||
@@ -2102,28 +2102,28 @@
|
||||
|
||||
/* sysfs class */
|
||||
memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev));
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
|
||||
- if (vfd->dev)
|
||||
- vfd->class_dev.dev = vfd->dev;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
+// if (vfd->dev)
|
||||
+// vfd->class_dev.dev = vfd->dev;
|
||||
#else
|
||||
if (vfd->dev)
|
||||
vfd->class_dev.parent = vfd->dev;
|
||||
#endif
|
||||
- vfd->class_dev.class = &video_class;
|
||||
+// vfd->class_dev.class = &video_class;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
- vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
|
||||
+// vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
|
||||
#endif
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
|
||||
- sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
+// sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base);
|
||||
#else
|
||||
sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base);
|
||||
#endif
|
||||
- ret = device_register(&vfd->class_dev);
|
||||
- if (ret < 0) {
|
||||
- printk(KERN_ERR "%s: device_register failed\n",
|
||||
+// ret = device_register(&vfd->class_dev);
|
||||
+// if (ret < 0) {
|
||||
+ printk(KERN_ERR "%s: device_register disabled\n",
|
||||
__func__);
|
||||
- goto fail_minor;
|
||||
- }
|
||||
+// goto fail_minor;
|
||||
+// }
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
|
||||
ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name);
|
||||
if (ret < 0) {
|
||||
@@ -2176,7 +2176,7 @@
|
||||
panic("videodev: bad unregister");
|
||||
|
||||
video_device[vfd->minor]=NULL;
|
||||
- device_unregister(&vfd->class_dev);
|
||||
+// device_unregister(&vfd->class_dev);
|
||||
mutex_unlock(&videodev_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(video_unregister_device);
|
||||
Reference in New Issue
Block a user