[packages] pepperspot: update to 0.3 (closes: #7191)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@21017 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4e8a68050d
commit
d1902ac136
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2008-2009 OpenWrt.org
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=pepperspot
|
PKG_NAME:=pepperspot
|
||||||
PKG_VERSION:=0.2
|
PKG_VERSION:=0.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=@SF/pepperspot
|
PKG_SOURCE_URL:=@SF/pepperspot
|
||||||
PKG_MD5SUM:=a7ac2c8f93799f7d23d9ad2a0841fe4a
|
PKG_MD5SUM:=10e6d42be577c231135c36440d86012a
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
@ -23,9 +23,9 @@ define Package/pepperspot
|
|||||||
SUBMENU:=Captive Portals
|
SUBMENU:=Captive Portals
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+kmod-tun +kmod-ipv6
|
|
||||||
TITLE:=Wireless LAN HotSpot controller
|
TITLE:=Wireless LAN HotSpot controller
|
||||||
URL:=http://pepperspot.sourceforge.net/
|
URL:=http://pepperspot.sourceforge.net/
|
||||||
|
DEPENDS:=+kmod-tun +kmod-ipv6
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/pepperspot/description
|
define Package/pepperspot/description
|
||||||
@ -41,11 +41,21 @@ endef
|
|||||||
|
|
||||||
# uses GNU configure
|
# uses GNU configure
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(call Build/Prepare/Default)
|
||||||
|
# prevent autoconf invocation, since one the patches touched
|
||||||
|
# configure
|
||||||
|
(cd $(PKG_BUILD_DIR); \
|
||||||
|
touch -r Makefile.am configure.in; \
|
||||||
|
touch -r Makefile.in configure; \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/pepperspot/install
|
define Package/pepperspot/install
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/pepper
|
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/pepper
|
||||||
$(INSTALL_DIR) $(1)/etc
|
$(INSTALL_DIR) $(1)/etc
|
||||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/pepper.conf $(1)/etc/
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/extra/pepper.conf $(1)/etc/
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pepper $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pepper $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
22
net/pepperspot/patches/101-cflags.patch
Normal file
22
net/pepperspot/patches/101-cflags.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -2801,8 +2801,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am
|
||||||
|
ac_config_headers="$ac_config_headers config.h"
|
||||||
|
|
||||||
|
|
||||||
|
-CFLAGS=""
|
||||||
|
-
|
||||||
|
# Checks for programs.
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -9,8 +9,6 @@ AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
|
AM_CONFIG_HEADER([config.h])
|
||||||
|
|
||||||
|
-CFLAGS=""
|
||||||
|
-
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
|
134
net/pepperspot/patches/102-no_warnings.patch
Normal file
134
net/pepperspot/patches/102-no_warnings.patch
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
--- a/src/pepper.c
|
||||||
|
+++ b/src/pepper.c
|
||||||
|
@@ -389,7 +389,7 @@ static int set_env(char *name, char *val
|
||||||
|
}
|
||||||
|
else if(mac != NULL)
|
||||||
|
{
|
||||||
|
- (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X",
|
||||||
|
+ (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX",
|
||||||
|
mac[0], mac[1],
|
||||||
|
mac[2], mac[3],
|
||||||
|
mac[4], mac[5]);
|
||||||
|
@@ -447,7 +447,7 @@ static int set_envv6(char *name, char *v
|
||||||
|
}
|
||||||
|
else if(mac != NULL)
|
||||||
|
{
|
||||||
|
- (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X",
|
||||||
|
+ (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX",
|
||||||
|
mac[0], mac[1],
|
||||||
|
mac[2], mac[3],
|
||||||
|
mac[4], mac[5]);
|
||||||
|
@@ -958,7 +958,7 @@ static int set_macallowed(char *macallow
|
||||||
|
for(i = 0; i < strlen(p1); i++)
|
||||||
|
if(!isxdigit(p1[i])) p1[i] = 0x20;
|
||||||
|
|
||||||
|
- if(sscanf(p1, "%2x %2x %2x %2x %2x %2x",
|
||||||
|
+ if(sscanf(p1, "%2hhx %2hhx %2hhx %2hhx %2hhx %2hhx",
|
||||||
|
&options.macok[options.macoklen][0],
|
||||||
|
&options.macok[options.macoklen][1],
|
||||||
|
&options.macok[options.macoklen][2],
|
||||||
|
@@ -973,7 +973,7 @@ static int set_macallowed(char *macallow
|
||||||
|
}
|
||||||
|
if(options.debug & DEBUG_CONF)
|
||||||
|
{
|
||||||
|
- printf("Macallowed address #%d: %.2X-%.2X-%.2X-%.2X-%.2X-%.2X\n",
|
||||||
|
+ printf("Macallowed address #%d: %.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX\n",
|
||||||
|
options.macoklen,
|
||||||
|
options.macok[options.macoklen][0],
|
||||||
|
options.macok[options.macoklen][1],
|
||||||
|
--- a/src/redir.c
|
||||||
|
+++ b/src/redir.c
|
||||||
|
@@ -178,7 +178,7 @@ static int redir_hextochar(char *src, in
|
||||||
|
{
|
||||||
|
char x[3];
|
||||||
|
int n = 0;
|
||||||
|
- int y = 0;
|
||||||
|
+ unsigned int y = 0;
|
||||||
|
int nb = len / 2;
|
||||||
|
|
||||||
|
for(n = 0 ; n < nb ; n++)
|
||||||
|
--- a/src/radius.c
|
||||||
|
+++ b/src/radius.c
|
||||||
|
@@ -971,7 +971,7 @@ int radius_getattr(struct radius_packet_
|
||||||
|
}
|
||||||
|
offset += t->l;
|
||||||
|
}
|
||||||
|
- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
+ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
}
|
||||||
|
else /* Need to check pack -> length */
|
||||||
|
{
|
||||||
|
@@ -992,7 +992,7 @@ int radius_getattr(struct radius_packet_
|
||||||
|
}
|
||||||
|
offset += t->l;
|
||||||
|
}
|
||||||
|
- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
+ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1; /* Not found */
|
||||||
|
@@ -1040,7 +1040,7 @@ int radius_getattrv6(struct radius_packe
|
||||||
|
}
|
||||||
|
offset += t->l;
|
||||||
|
}
|
||||||
|
- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
+ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
}
|
||||||
|
else /* Need to check pack -> length */
|
||||||
|
{
|
||||||
|
@@ -1061,7 +1061,7 @@ int radius_getattrv6(struct radius_packe
|
||||||
|
}
|
||||||
|
offset += t->l;
|
||||||
|
}
|
||||||
|
- while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
+ while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1; /* Not found */
|
||||||
|
@@ -1090,7 +1090,7 @@ int radius_getattrv6(struct radius_packe
|
||||||
|
}
|
||||||
|
offset += 2 + t->l;
|
||||||
|
}
|
||||||
|
- while(offset < ntohs(pack->length));
|
||||||
|
+ while(offset < (int)ntohs(pack->length));
|
||||||
|
|
||||||
|
if(0) printf("Count %d\n", count);
|
||||||
|
return count;
|
||||||
|
@@ -1903,7 +1903,7 @@ int radius_decaps(struct radius_t *this)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if(ntohs(pack.length) != status)
|
||||||
|
+ if((int)ntohs(pack.length) != status)
|
||||||
|
{
|
||||||
|
sys_err(LOG_WARNING, __FILE__, __LINE__, errno,
|
||||||
|
"Received radius packet with wrong length field %d != %d!",
|
||||||
|
@@ -2107,7 +2107,7 @@ int radius_proxy_ind(struct radius_t *th
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if(ntohs(pack.length) != status)
|
||||||
|
+ if((int)ntohs(pack.length) != status)
|
||||||
|
{
|
||||||
|
sys_err(LOG_WARNING, __FILE__, __LINE__, 0,
|
||||||
|
"Received radius packet with wrong length field %d != %d!",
|
||||||
|
--- a/src/dhcp.c
|
||||||
|
+++ b/src/dhcp.c
|
||||||
|
@@ -240,7 +240,7 @@ static int dhcp_tcp_checkv6(struct dhcp_
|
||||||
|
struct dhcp_tcphdr_t *tcph = NULL;
|
||||||
|
int tcp_len = 0;
|
||||||
|
|
||||||
|
- if(ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN))
|
||||||
|
+ if((int)ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN))
|
||||||
|
return -1; /* Wrong length of packet */
|
||||||
|
|
||||||
|
tcp_len = ntohs(pack->ip6h.payload_length);
|
||||||
|
@@ -347,7 +347,7 @@ static int dhcp_tcp_check(struct dhcp_ip
|
||||||
|
struct dhcp_tcphdr_t *tcph;
|
||||||
|
int tcp_len = 0;
|
||||||
|
|
||||||
|
- if(ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN))
|
||||||
|
+ if((int)ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN))
|
||||||
|
return -1; /* Wrong length of packet */
|
||||||
|
|
||||||
|
tcp_len = ntohs(pack->iph.tot_len) - pack->iph.ihl * 4;
|
Loading…
x
Reference in New Issue
Block a user