summaryrefslogtreecommitdiff
path: root/debian/patches/patch.IP_SRCROUTE
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/patch.IP_SRCROUTE')
-rw-r--r--debian/patches/patch.IP_SRCROUTE94
1 files changed, 94 insertions, 0 deletions
diff --git a/debian/patches/patch.IP_SRCROUTE b/debian/patches/patch.IP_SRCROUTE
new file mode 100644
index 0000000..84b7ee8
--- /dev/null
+++ b/debian/patches/patch.IP_SRCROUTE
@@ -0,0 +1,94 @@
+*** ../../src/conf.h Mon Apr 12 15:12:30 1999
+--- conf.h Thu Apr 8 15:35:20 1999
+***************
+*** 1284,1290 ****
+ # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
+ # define GIDSET_T gid_t /* from <linux/types.h> */
+ # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
+! # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
+ # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
+ # ifndef HASFLOCK
+ # include <linux/version.h>
+--- 1284,1290 ----
+ # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
+ # define GIDSET_T gid_t /* from <linux/types.h> */
+ # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
+! # define IP_SRCROUTE 1 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
+ # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
+ # ifndef HASFLOCK
+ # include <linux/version.h>
+*** ../../src/daemon.c Mon Apr 12 15:12:30 1999
+--- daemon.c Mon Apr 12 15:37:50 1999
+***************
+*** 42,48 ****
+ # if IP_SRCROUTE
+ # include <netinet/in_systm.h>
+ # include <netinet/ip.h>
+! # include <netinet/ip_var.h>
+ # endif
+
+ /*
+--- 42,50 ----
+ # if IP_SRCROUTE
+ # include <netinet/in_systm.h>
+ # include <netinet/ip.h>
+! # ifndef __linux__
+! # include <netinet/ip_var.h>
+! # endif
+ # endif
+
+ /*
+***************
+*** 1570,1584 ****
+ u_char *o;
+ int l;
+ struct in_addr addr;
+ struct ipoption ipopt;
+!
+ ipoptlen = sizeof ipopt;
+ if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS,
+ (char *) &ipopt, &ipoptlen) < 0)
+ goto noipsr;
+ if (ipoptlen == 0)
+ goto noipsr;
+ o = (u_char *) ipopt.ipopt_list;
+ while (o != NULL && o < (u_char *) &ipopt + ipoptlen)
+ {
+ switch (*o)
+--- 1572,1593 ----
+ u_char *o;
+ int l;
+ struct in_addr addr;
++ # ifndef __linux__
+ struct ipoption ipopt;
+! # else
+! struct ip_options ipopt;
+! # endif
+ ipoptlen = sizeof ipopt;
+ if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS,
+ (char *) &ipopt, &ipoptlen) < 0)
+ goto noipsr;
+ if (ipoptlen == 0)
+ goto noipsr;
++ # ifndef __linux__
+ o = (u_char *) ipopt.ipopt_list;
++ # else
++ o = (u_char *) ipopt.__data;
++ # endif
+ while (o != NULL && o < (u_char *) &ipopt + ipoptlen)
+ {
+ switch (*o)
+***************
+*** 1609,1615 ****
+--- 1618,1628 ----
+ snprintf(p, SPACELEFT(hbuf, p), " [%s@%.*s",
+ *o == IPOPT_SSRR ? "!" : "",
+ l > 240 ? 120 : l / 2,
++ # ifndef __linux__
+ inet_ntoa(GET_IPOPT_DST(ipopt.ipopt_dst)));
++ # else
++ ipopt.faddr);
++ # endif
+ i = strlen(p);
+ p += i;
+ l -= strlen(p);