aboutsummaryrefslogtreecommitdiff
path: root/security/skip/files/patch-bs
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>2000-02-01 18:39:09 +0000
committerArchie Cobbs <archie@FreeBSD.org>2000-02-01 18:39:09 +0000
commita919714314086131ba4129645f29a0a22df338ae (patch)
tree44c70d6e043ee701b4f9d72f92c0900694dd67f3 /security/skip/files/patch-bs
parentff51f86e8c5063c6a30feb6ce8d47377f977b4c0 (diff)
Notes
Diffstat (limited to 'security/skip/files/patch-bs')
-rw-r--r--security/skip/files/patch-bs79
1 files changed, 54 insertions, 25 deletions
diff --git a/security/skip/files/patch-bs b/security/skip/files/patch-bs
index 4de36f9cc465..591fff4e2aa5 100644
--- a/security/skip/files/patch-bs
+++ b/security/skip/files/patch-bs
@@ -1,7 +1,31 @@
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.new/skip/freebsd/skip_es.c
--- skipsrc-1.0.orig/skip/freebsd/skip_es.c Fri Oct 25 13:12:42 1996
-+++ work.new/skip/freebsd/skip_es.c Mon Jan 24 12:35:39 2000
-@@ -81,6 +81,11 @@
++++ work.new/skip/freebsd/skip_es.c Tue Feb 1 10:07:11 2000
+@@ -63,6 +63,10 @@
+ #include <skip_if.h>
+ #include <skip_crypt.h>
+
++#if __FreeBSD_version >= 400013
++#include <netinet/ipprotosw.h>
++#endif
++
+ /*
+ * global SKIP interface information
+ */
+@@ -73,14 +77,24 @@
+ int skip_alignment = 4; /* 32 bit */
+ static unsigned int inetsw_size = 0;
+
++#if __FreeBSD_version < 400013
+ static struct protosw *inetsw_default;
+ extern struct protosw inetsw[];
++#else
++static struct ipprotosw *inetsw_default;
++extern struct ipprotosw inetsw[];
++#endif
+
+ skip_es_t *skip_es_ifs = NULL;
+ static int skip_inited = 0;
static unsigned short skip_pktid;
static skip_softc_t skip_softc[SKIP_MAX_OPENS];
@@ -13,7 +37,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
/*
* statistics
*/
-@@ -116,11 +121,13 @@
+@@ -116,11 +130,13 @@
static int skip_ifoutput(struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *rtp);
static int skip_ifinput(struct mbuf *, int);
@@ -30,7 +54,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
static void skip_encrypt_done(void *, struct mbuf *, struct mbuf *,
void *, skip_arg_t *);
-@@ -136,14 +143,14 @@
+@@ -136,14 +152,14 @@
/*
* From Crypt/MAC system...
*/
@@ -53,7 +77,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
extern int skip_fmt_kmgr(union skip_messages *, skip_keycb_t *);
extern struct cdevsw skipdevsw;
-@@ -157,7 +164,7 @@
+@@ -157,7 +173,7 @@
* Returns: 0 on success, errno otherwise.
*/
int
@@ -62,7 +86,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
{
register int s, rc;
register struct protosw *pr;
-@@ -252,7 +259,10 @@
+@@ -252,7 +268,10 @@
for (pr = inetdomain.dom_protosw;
pr < inetdomain.dom_protoswNPROTOSW; pr++) {
@@ -74,7 +98,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
splx(s);
}
-@@ -266,7 +276,7 @@
+@@ -266,7 +285,7 @@
* Returns: 0 on success, errno otherwise.
*/
int
@@ -83,7 +107,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
{
register int s;
if (skip_busy || skip_keys_stats.skip_encrypt_keys_active
-@@ -319,7 +329,11 @@
+@@ -319,7 +338,11 @@
major(dev), flags);
#endif
@@ -95,7 +119,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
return (EPERM);
}
if (minor(dev) >= SKIP_MAX_OPENS) {
-@@ -422,27 +436,30 @@
+@@ -422,27 +445,30 @@
* Returns: 0 if no data available, 1 otherwise
*/
int
@@ -136,7 +160,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
/* skip_ifread()
-@@ -786,9 +803,9 @@
+@@ -786,9 +812,9 @@
* Returns: None
*/
static void
@@ -148,7 +172,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
/* skip_uninittimers()
-@@ -798,9 +815,10 @@
+@@ -798,9 +824,10 @@
* Returns: None
*/
static void
@@ -161,7 +185,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
/* skip_timer()
-@@ -812,14 +830,13 @@
+@@ -812,14 +839,13 @@
*/
/*ARGSUSED*/
static void
@@ -178,7 +202,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
#ifdef notdef
-@@ -846,6 +863,7 @@
+@@ -846,6 +872,7 @@
}
#endif
@@ -186,7 +210,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
void
skip_dump_buf(char *what, unsigned char *p, int len)
{
-@@ -857,7 +875,9 @@
+@@ -857,7 +884,9 @@
}
printf("].\n");
}
@@ -196,7 +220,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
void
skip_dump_ip(struct ip *ip)
{
-@@ -878,6 +898,7 @@
+@@ -878,6 +907,7 @@
ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum));
}
@@ -204,7 +228,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
/*
* SKIP Ioctl and Interface management routines
-@@ -1107,7 +1128,7 @@
+@@ -1107,7 +1137,7 @@
int
skip_ifioctl(dev, cmd, data, fflag, p)
dev_t dev;
@@ -213,7 +237,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
caddr_t data;
int fflag;
struct proc *p;
-@@ -1390,7 +1411,6 @@
+@@ -1390,7 +1420,6 @@
skip_es_t *skip_if;
int iphlen, hdrlen = 0;
struct mbuf *decryptbuf = NULL;
@@ -221,7 +245,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
skip_param_t params;
skip_hdr_t skip_hdr;
skip_es_hash_t *entry, **acl;
-@@ -1718,7 +1738,7 @@
+@@ -1718,7 +1747,7 @@
*/
decryptbuf->m_data += iphlen;
@@ -230,16 +254,21 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
decryptbuf->m_len, decryptbuf->m_data);
}
-@@ -1745,7 +1765,7 @@
+@@ -1745,8 +1774,12 @@
ip->ip_id = ntohs(ip->ip_id);
ip->ip_off = ntohs(ip->ip_off);
pass:
- m->m_flags &= ~ M_EOR;
+ m->m_flags &= ~ M_PROTO1;
++#if __FreeBSD_version < 400013
(*inetsw_default[ip_protox[ip->ip_p]].pr_input)(m, hlen);
++#else
++ (*inetsw_default[ip_protox[ip->ip_p]].pr_input)(m, hlen, ip->ip_p);
++#endif
return (0);
}
-@@ -1910,6 +1930,13 @@
+
+@@ -1910,6 +1943,13 @@
*/
IPADDRCOPY(&params.tunnel_addr, &newip->ip_dst);
@@ -253,7 +282,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
encryptbuf->m_len += sizeof (struct ip);
/*
-@@ -2005,7 +2032,7 @@
+@@ -2005,7 +2045,7 @@
if (params.kp_alg) {
newip->ip_p = SKIP_NEXT_ESP;
} else {
@@ -262,7 +291,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
}
skip_if->stats.skip_if_raw_out++;
-@@ -2028,6 +2055,13 @@
+@@ -2028,6 +2068,13 @@
* insert tunnel address as destination
*/
IPADDRCOPY(&params.tunnel_addr, &newip->ip_dst);
@@ -276,7 +305,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
}
if (params.s_nsid == 0) {
-@@ -2097,7 +2131,7 @@
+@@ -2097,7 +2144,7 @@
register skip_param_t *params = &res->params;
register struct ip *ip = mtod(original, struct ip *);
int rc, s, iphlen;
@@ -285,7 +314,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
SKIP_PRINT("skip_decrypt_done", params);
-@@ -2125,7 +2159,7 @@
+@@ -2125,7 +2172,7 @@
*/
outbuf = (res->modes & SKIP_CRYPT_ON) ? m : original;
@@ -294,7 +323,7 @@ diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.
/*
* transport mode, need to copy original IP header
*/
-@@ -2195,7 +2229,7 @@
+@@ -2195,7 +2242,7 @@
/*
* tag the start of the header buffer so SKIP can recognise it
*/