mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
Unbreak transparent proxy mode. Again.
This commit is contained in:
parent
41c1cd0036
commit
7b95b4263e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145442
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= tircproxy
|
||||
PORTVERSION= 0.4.5
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= irc
|
||||
MASTER_SITES= http://bre.klaki.net/programs/tircproxy/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- Makefile.in.orig Thu May 4 08:11:25 2000
|
||||
+++ Makefile.in Thu Mar 29 14:31:46 2001
|
||||
--- Makefile.in Sat Oct 15 06:49:57 2005
|
||||
+++ Makefile.in Sat Oct 15 06:50:00 2005
|
||||
@@ -12,7 +12,7 @@
|
||||
TARGETNAME=@sbindir@/tircproxy
|
||||
STRIP=@STRIP@
|
@ -1,12 +0,0 @@
|
||||
--- tircproxy.c.orig Thu Mar 29 14:28:26 2001
|
||||
+++ tircproxy.c Thu Mar 29 14:28:28 2001
|
||||
@@ -2201,7 +2201,9 @@
|
||||
/* People neither using the CDIR stuff nor running as root probably
|
||||
* couldn't care less about ident problems.
|
||||
*/
|
||||
+#ifdef CDIR_IDENT
|
||||
if (!use_cdir && getuid()) tries = 10;
|
||||
+#endif
|
||||
|
||||
/* FIXME: dangerous sprintfs */
|
||||
#ifdef CDIR
|
@ -1,43 +0,0 @@
|
||||
--- tircproxy.c.orig Wed Jun 29 13:40:45 2005
|
||||
+++ tircproxy.c Wed Jun 29 13:42:01 2005
|
||||
@@ -131,9 +131,14 @@
|
||||
# include <netinet/ip_compat.h>
|
||||
# endif
|
||||
# include <netinet/ip_fil.h>
|
||||
+# include <netinet/ip_nat.h>
|
||||
+# include <netinet/ip_state.h>
|
||||
# include <netinet/ip_proxy.h>
|
||||
# include <netinet/ip_nat.h>
|
||||
# define TRANS 1
|
||||
+# ifndef IPL_NAT
|
||||
+# define IPL_NAT IPNAT_NAME
|
||||
+# endif
|
||||
# warning IPF transparent proxying available
|
||||
# else
|
||||
# undef IPF
|
||||
@@ -1066,9 +1071,10 @@
|
||||
struct sockaddr_in to_addr;
|
||||
int to_len;
|
||||
#if IPF
|
||||
- struct sockaddr_in socketin, sloc;
|
||||
- natlookup_t natlook;
|
||||
- int fd;
|
||||
+ struct sockaddr_in socketin, sloc;
|
||||
+ natlookup_t natlook;
|
||||
+ natlookup_t *natlookp = &natlook;
|
||||
+ int fd;
|
||||
#endif
|
||||
|
||||
/* Give this thing 10 minutes to get started (paranoia).
|
||||
@@ -1152,9 +1158,9 @@
|
||||
natlook.nl_inport = sloc.sin_port;
|
||||
|
||||
fd = open(IPL_NAT, O_RDONLY);
|
||||
- if (ioctl(fd, SIOCGNATL, &natlook) == -1)
|
||||
+ if (ioctl(fd, SIOCGNATL, &natlookp) == -1)
|
||||
{
|
||||
- perror("ioctl");
|
||||
+ perror("ioctl(SIOCGNATL)");
|
||||
exit(-1);
|
||||
}
|
||||
close(fd);
|
76
irc/tircproxy/files/patch-tircproxy.c
Normal file
76
irc/tircproxy/files/patch-tircproxy.c
Normal file
@ -0,0 +1,76 @@
|
||||
--- tircproxy.c.orig Thu May 4 22:53:30 2000
|
||||
+++ tircproxy.c Sat Oct 15 07:02:11 2005
|
||||
@@ -131,9 +131,16 @@
|
||||
# include <netinet/ip_compat.h>
|
||||
# endif
|
||||
# include <netinet/ip_fil.h>
|
||||
+# include <netinet/ip_nat.h>
|
||||
+# include <netinet/ip_state.h>
|
||||
# include <netinet/ip_proxy.h>
|
||||
# include <netinet/ip_nat.h>
|
||||
+# include <netinet/ipl.h>
|
||||
+# include <osreldate.h>
|
||||
# define TRANS 1
|
||||
+# ifndef IPL_NAT
|
||||
+# define IPL_NAT IPNAT_NAME
|
||||
+# endif
|
||||
# warning IPF transparent proxying available
|
||||
# else
|
||||
# undef IPF
|
||||
@@ -1066,9 +1073,13 @@
|
||||
struct sockaddr_in to_addr;
|
||||
int to_len;
|
||||
#if IPF
|
||||
- struct sockaddr_in socketin, sloc;
|
||||
- natlookup_t natlook;
|
||||
- int fd;
|
||||
+#if __FreeBSD_version >=600024
|
||||
+ ipfobj_t obj;
|
||||
+#endif
|
||||
+ struct sockaddr_in socketin, sloc;
|
||||
+ natlookup_t natlook;
|
||||
+ natlookup_t *natlookp = &natlook;
|
||||
+ int fd;
|
||||
#endif
|
||||
|
||||
/* Give this thing 10 minutes to get started (paranoia).
|
||||
@@ -1144,6 +1155,13 @@
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
+#if __FreeBSD_version >=600024
|
||||
+ bzero(&obj, sizeof(obj));
|
||||
+ obj.ipfo_rev = IPFILTER_VERSION;
|
||||
+ obj.ipfo_size = sizeof(natlook);
|
||||
+ obj.ipfo_ptr = &natlook;
|
||||
+ obj.ipfo_type = IPFOBJ_NATLOOKUP;
|
||||
+#endif
|
||||
bzero((char *)&natlook, sizeof(natlook));
|
||||
natlook.nl_outip = socketin.sin_addr;
|
||||
natlook.nl_inip = sloc.sin_addr;
|
||||
@@ -1152,9 +1170,13 @@
|
||||
natlook.nl_inport = sloc.sin_port;
|
||||
|
||||
fd = open(IPL_NAT, O_RDONLY);
|
||||
- if (ioctl(fd, SIOCGNATL, &natlook) == -1)
|
||||
+#if __FreeBSD_version >=600024
|
||||
+ if (ioctl(fd, SIOCGNATL, &obj) == -1)
|
||||
+#else
|
||||
+ if (ioctl(fd, SIOCGNATL, &natlookp) == -1)
|
||||
+#endif
|
||||
{
|
||||
- perror("ioctl");
|
||||
+ perror("ioctl(SIOCGNATL)");
|
||||
exit(-1);
|
||||
}
|
||||
close(fd);
|
||||
@@ -2201,7 +2223,9 @@
|
||||
/* People neither using the CDIR stuff nor running as root probably
|
||||
* couldn't care less about ident problems.
|
||||
*/
|
||||
+#ifdef CDIR_IDENT
|
||||
if (!use_cdir && getuid()) tries = 10;
|
||||
+#endif
|
||||
|
||||
/* FIXME: dangerous sprintfs */
|
||||
#ifdef CDIR
|
@ -1,5 +1,5 @@
|
||||
--- tircproxy.h.orig Fri Dec 22 01:13:40 2000
|
||||
+++ tircproxy.h Fri Dec 22 01:15:39 2000
|
||||
--- tircproxy.h Sat Oct 15 06:49:51 2005
|
||||
+++ tircproxy.h Sat Oct 15 06:50:00 2005
|
||||
@@ -34,8 +34,8 @@
|
||||
/* Set the location of the broadcast & MOTD files. Undef these to disable
|
||||
** the broadcasting feature.
|
Loading…
Reference in New Issue
Block a user