mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 13:02:58 +02:00
miniupnpd: fix for build with newer iptables.
IPT_ALIGN is replaces by XT_ALIGN since iptables 1.4 and the compatiblity macro is removed in 1.4.14.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# 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 #
|
||||
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = miniupnpd
|
||||
PAK_VER = 0
|
||||
PAK_VER = 1
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
@@ -76,6 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/miniupnpd-iptcrdr.patch
|
||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch
|
||||
cd $(DIR_APP) && make -f Makefile.linux \
|
||||
CFLAGS="$(CFLAGS) -DIPTABLES_143 -I/usr/src/linux/include"
|
||||
|
||||
|
||||
47
src/patches/miniupnpd-1.4_use_XT_ALIGN.patch
Normal file
47
src/patches/miniupnpd-1.4_use_XT_ALIGN.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
diff -Naur miniupnpd-1.4.org/netfilter/iptcrdr.c miniupnpd-1.4/netfilter/iptcrdr.c
|
||||
--- miniupnpd-1.4.org/netfilter/iptcrdr.c 2009-10-10 21:19:41.000000000 +0200
|
||||
+++ miniupnpd-1.4/netfilter/iptcrdr.c 2012-07-29 16:09:42.640363971 +0200
|
||||
@@ -443,8 +443,8 @@
|
||||
struct ipt_entry_match *match;
|
||||
struct ipt_tcp * tcpinfo;
|
||||
size_t size;
|
||||
- size = IPT_ALIGN(sizeof(struct ipt_entry_match))
|
||||
- + IPT_ALIGN(sizeof(struct ipt_tcp));
|
||||
+ size = XT_ALIGN(sizeof(struct ipt_entry_match))
|
||||
+ + XT_ALIGN(sizeof(struct ipt_tcp));
|
||||
match = calloc(1, size);
|
||||
match->u.match_size = size;
|
||||
strncpy(match->u.user.name, "tcp", IPT_FUNCTION_MAXNAMELEN);
|
||||
@@ -462,8 +462,8 @@
|
||||
struct ipt_entry_match *match;
|
||||
struct ipt_udp * udpinfo;
|
||||
size_t size;
|
||||
- size = IPT_ALIGN(sizeof(struct ipt_entry_match))
|
||||
- + IPT_ALIGN(sizeof(struct ipt_udp));
|
||||
+ size = XT_ALIGN(sizeof(struct ipt_entry_match))
|
||||
+ + XT_ALIGN(sizeof(struct ipt_udp));
|
||||
match = calloc(1, size);
|
||||
match->u.match_size = size;
|
||||
strncpy(match->u.user.name, "udp", IPT_FUNCTION_MAXNAMELEN);
|
||||
@@ -483,8 +483,8 @@
|
||||
struct ip_nat_range * range;
|
||||
size_t size;
|
||||
|
||||
- size = IPT_ALIGN(sizeof(struct ipt_entry_target))
|
||||
- + IPT_ALIGN(sizeof(struct ip_nat_multi_range));
|
||||
+ size = XT_ALIGN(sizeof(struct ipt_entry_target))
|
||||
+ + XT_ALIGN(sizeof(struct ip_nat_multi_range));
|
||||
target = calloc(1, size);
|
||||
target->u.target_size = size;
|
||||
strncpy(target->u.user.name, "DNAT", IPT_FUNCTION_MAXNAMELEN);
|
||||
@@ -614,8 +614,8 @@
|
||||
{
|
||||
struct ipt_entry_target * target = NULL;
|
||||
size_t size;
|
||||
- size = IPT_ALIGN(sizeof(struct ipt_entry_target))
|
||||
- + IPT_ALIGN(sizeof(int));
|
||||
+ size = XT_ALIGN(sizeof(struct ipt_entry_target))
|
||||
+ + XT_ALIGN(sizeof(int));
|
||||
target = calloc(1, size);
|
||||
target->u.user.target_size = size;
|
||||
strncpy(target->u.user.name, "ACCEPT", IPT_FUNCTION_MAXNAMELEN);
|
||||
Reference in New Issue
Block a user