diff -cr ip_fil3.3.4/HISTORY ip_fil3.3.5/HISTORY *** ip_fil3.3.4/HISTORY Sat Dec 4 13:22:08 1999 --- ip_fil3.3.5/HISTORY Sat Dec 11 16:31:38 1999 *************** *** 20,26 **** --- 20,46 ---- # and especially those who have found the time to port IP Filter to new # platforms. # + 3.3.5 11/12/1999 - Released + + fix parsing of "log level" and printing it back out too + + is only present on Solaris2.6/7/8 + + use send_icmp_err rather than icmp_error to send back a frag-needed error + when doing PMTU + + do not use -b with add_drv on Solaris unless $BASEDIR is set. + + fix problem where source address in icmp replies is reversed + + fix yet another problem with real audio. + 3.3.4 4/12/1999 - Released + + patches from Guido: fix panic in ip_state:fr_checkicmpmatchingstate(), fix + byte order problem in ip_id (host order when called from ip_input(), vs + network byte order when called from ip_output()) and fix a problem where the + fragment cache was never timedout early. fix up the real audio proxy to properly setup state information and NAT entries, thanks to Laine Stump for testing/advice/fixes. diff -cr ip_fil3.3.4/SunOS5/pkginfo ip_fil3.3.5/SunOS5/pkginfo *** ip_fil3.3.4/SunOS5/pkginfo Sat Dec 4 13:22:10 1999 --- ip_fil3.3.5/SunOS5/pkginfo Thu Dec 9 22:11:34 1999 *************** *** 5,11 **** PKG=ipf NAME=IP Filter ARCH=sparc,i386 ! VERSION=3.3.4 CATEGORY=system DESC=This package contains tools for building a firewall VENDOR=Darren Reed --- 5,11 ---- PKG=ipf NAME=IP Filter ARCH=sparc,i386 ! VERSION=3.3.5 CATEGORY=system DESC=This package contains tools for building a firewall VENDOR=Darren Reed diff -cr ip_fil3.3.4/SunOS5/postinstall ip_fil3.3.5/SunOS5/postinstall *** ip_fil3.3.4/SunOS5/postinstall Mon Nov 15 21:27:47 1999 --- ip_fil3.3.5/SunOS5/postinstall Fri Dec 10 02:36:28 1999 *************** *** 16,22 **** if [ x"`grep minor=ipauth ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipauth \M0" >> ${DEVLINK} fi ! add_drv -m '* 0600 root root' -b ${BASEDIR:-/} ipf /usr/sbin/devlinks -r ${BASEDIR:-/} if [ -d /usr/ucb -a -f /usr/ucb/ucblinks ] ; then /usr/ucb/ucblinks -r ${BASEDIR:-/} --- 16,26 ---- if [ x"`grep minor=ipauth ${DEVLINK}`" = x ] ; then echo "type=ddi_pseudo;name=ipf;minor=ipauth \M0" >> ${DEVLINK} fi ! if [ x${BASEDIR} = x ] ; then ! add_drv -m '* 0600 root root' ipf ! else ! add_drv -m '* 0600 root root' -b ${BASEDIR:-/} ipf ! fi /usr/sbin/devlinks -r ${BASEDIR:-/} if [ -d /usr/ucb -a -f /usr/ucb/ucblinks ] ; then /usr/ucb/ucblinks -r ${BASEDIR:-/} diff -cr ip_fil3.3.4/fil.c ip_fil3.3.5/fil.c *** ip_fil3.3.4/fil.c Sat Dec 4 13:05:42 1999 --- ip_fil3.3.5/fil.c Tue Dec 7 23:53:40 1999 *************** *** 7,13 **** */ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fil.c,v 2.3.2.13 1999/12/04 02:05:42 darrenr Exp $"; #endif #include --- 7,13 ---- */ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: fil.c,v 2.3.2.14 1999/12/07 12:53:40 darrenr Exp $"; #endif #include *************** *** 1178,1184 **** * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 ! * $Id: fil.c,v 2.3.2.13 1999/12/04 02:05:42 darrenr Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, --- 1178,1184 ---- * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 ! * $Id: fil.c,v 2.3.2.14 1999/12/07 12:53:40 darrenr Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, *************** *** 1544,1550 **** in = sin->sin_addr; # endif /* linux */ # endif /* SOLARIS */ - in.s_addr = ntohl(in.s_addr); *inp = in; return 0; } --- 1544,1549 ---- diff -cr ip_fil3.3.4/ip_fil.c ip_fil3.3.5/ip_fil.c *** ip_fil3.3.4/ip_fil.c Sat Dec 4 13:12:54 1999 --- ip_fil3.3.5/ip_fil.c Sat Dec 11 16:31:08 1999 *************** *** 7,13 **** */ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.4.2.10 1999/12/04 02:12:54 darrenr Exp $"; #endif #ifndef SOLARIS --- 7,13 ---- */ #if !defined(lint) static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.4.2.14 1999/12/11 05:31:08 darrenr Exp $"; #endif #ifndef SOLARIS *************** *** 702,716 **** } if (!f) { ! if (req == SIOCINAFR || req == SIOCINIFR) { ! ftail = fprev; ! if (fp->fr_hits) { ! while (--fp->fr_hits && (f = *ftail)) { ftail = &f->fr_next; ! } ! } } - f = NULL; } if (req == SIOCDELFR || req == SIOCRMIFR) { --- 702,716 ---- } if (!f) { ! if (req != SIOCINAFR || req != SIOCINIFR) ! while ((f = *ftail)) ! ftail = &f->fr_next; ! else { ! if (fp->fr_hits) ! while (--fp->fr_hits && (f = *ftail)) ftail = &f->fr_next; ! f = NULL; } } if (req == SIOCDELFR || req == SIOCRMIFR) { *************** *** 735,741 **** error = EEXIST; else { if (unit == IPL_LOGAUTH) ! return fr_auth_ioctl(data, req, f, ftail); KMALLOC(f, frentry_t *); if (f != NULL) { if (fg && fg->fg_head) --- 735,741 ---- error = EEXIST; else { if (unit == IPL_LOGAUTH) ! return fr_auth_ioctl(data, req, fp, ftail); KMALLOC(f, frentry_t *); if (f != NULL) { if (fg && fg->fg_head) *************** *** 954,960 **** ip_t *oip; int type, code; void *ifp; ! struct in_addr dst; { struct icmp *icmp; struct mbuf *m; --- 954,960 ---- ip_t *oip; int type, code; void *ifp; ! struct in_addr dst; { struct icmp *icmp; struct mbuf *m; *************** *** 989,995 **** if (dst.s_addr == 0) { if (fr_ifpaddr(ifp, &dst) == -1) return -1; - dst.s_addr = htonl(dst.s_addr); } nip->ip_src = dst; nip->ip_dst = oip->ip_src; --- 989,994 ---- *************** *** 1255,1273 **** RTFREE(ro->ro_rt); return 0; bad: ! # if BSD >= 199306 ! if (error == EMSGSIZE) { ! /* Send ICMP error here */ ! struct mbuf *mcopy; ! ! mcopy = m_copy(m, 0, imin((int)ip->ip_len, 68)); ! if (mcopy) { ! mcopy->m_pkthdr.rcvif = (struct ifnet *)ifp; ! icmp_error(mcopy, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, ! ip->ip_dst.s_addr, ifp); ! } ! } ! # endif m_freem(m); goto done; } --- 1254,1262 ---- RTFREE(ro->ro_rt); return 0; bad: ! if (error == EMSGSIZE) ! (void) send_icmp_err(ip, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, ! ifp, ip->ip_dst); m_freem(m); goto done; } diff -cr ip_fil3.3.4/ip_nat.c ip_fil3.3.5/ip_nat.c *** ip_fil3.3.4/ip_nat.c Sat Dec 4 13:08:43 1999 --- ip_fil3.3.5/ip_nat.c Tue Dec 7 23:53:42 1999 *************** *** 9,15 **** */ #if !defined(lint) static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.2.2.9 1999/12/04 02:08:43 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) --- 9,15 ---- */ #if !defined(lint) static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.2.2.10 1999/12/07 12:53:42 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) *************** *** 773,778 **** --- 773,779 ---- KFREE(nat); return NULL; } + in.s_addr = ntohl(in.s_addr); } else if (!in.s_addr && !np->in_outmsk) { /* * 0/0 - use the original source address/port. *************** *** 1709,1715 **** */ sum1 = nat->nat_outip.s_addr; if (fr_ifpaddr(ifp2, &in) != -1) ! nat->nat_outip.s_addr = htonl(in.s_addr); sum2 = nat->nat_outip.s_addr; if (sum1 == sum2) --- 1710,1716 ---- */ sum1 = nat->nat_outip.s_addr; if (fr_ifpaddr(ifp2, &in) != -1) ! nat->nat_outip = in; sum2 = nat->nat_outip.s_addr; if (sum1 == sum2) diff -cr ip_fil3.3.4/ip_raudio_pxy.c ip_fil3.3.5/ip_raudio_pxy.c *** ip_fil3.3.4/ip_raudio_pxy.c Sat Dec 4 13:12:34 1999 --- ip_fil3.3.5/ip_raudio_pxy.c Sun Dec 5 22:13:17 1999 *************** *** 56,62 **** nat_t *nat; { raudio_t *rap = aps->aps_data; ! char membuf[512 + 1], *s; u_short id = 0; tcphdr_t *tcp; int off, dlen; --- 56,62 ---- nat_t *nat; { raudio_t *rap = aps->aps_data; ! unsigned char membuf[512 + 1], *s; u_short id = 0; tcphdr_t *tcp; int off, dlen; *************** *** 82,95 **** dlen = msgdsize(m) - off; if (dlen <= 0) return 0; ! copyout_mblk(m, off, MIN(sizeof(membuf), dlen), membuf); #else m = *(mb_t **)fin->fin_mp; dlen = mbufchainlen(m) - off; if (dlen <= 0) return 0; ! m_copydata(m, off, MIN(sizeof(membuf), dlen), membuf); #endif /* * In all the startup parsing, ensure that we don't go outside --- 82,95 ---- dlen = msgdsize(m) - off; if (dlen <= 0) return 0; ! copyout_mblk(m, off, MIN(sizeof(membuf), dlen), (char *)membuf); #else m = *(mb_t **)fin->fin_mp; dlen = mbufchainlen(m) - off; if (dlen <= 0) return 0; ! m_copydata(m, off, MIN(sizeof(membuf), dlen), (char *)membuf); #endif /* * In all the startup parsing, ensure that we don't go outside *************** *** 99,105 **** * Look for the start of connection "PNA" string if not seen yet. */ if (rap->rap_seenpna == 0) { ! s = memstr("PNA", membuf, 3, dlen); if (s == NULL) return 0; s += 3; --- 99,105 ---- * Look for the start of connection "PNA" string if not seen yet. */ if (rap->rap_seenpna == 0) { ! s = (u_char *)memstr("PNA", (char *)membuf, 3, dlen); if (s == NULL) return 0; s += 3; *************** *** 163,169 **** ap_session_t *aps; nat_t *nat; { ! char membuf[IPF_MAXPORTLEN + 1], *s; tcphdr_t *tcp, tcph, *tcp2 = &tcph; raudio_t *rap = aps->aps_data; struct in_addr swa, swb; --- 163,169 ---- ap_session_t *aps; nat_t *nat; { ! unsigned char membuf[IPF_MAXPORTLEN + 1], *s; tcphdr_t *tcp, tcph, *tcp2 = &tcph; raudio_t *rap = aps->aps_data; struct in_addr swa, swb; *************** *** 198,210 **** if (dlen <= 0) return 0; bzero(membuf, sizeof(membuf)); ! copyout_mblk(m, off, MIN(sizeof(membuf), dlen), membuf); #else dlen = mbufchainlen(m) - off; if (dlen <= 0) return 0; bzero(membuf, sizeof(membuf)); ! m_copydata(m, off, MIN(sizeof(membuf), dlen), membuf); #endif seq = ntohl(tcp->th_seq); --- 198,210 ---- if (dlen <= 0) return 0; bzero(membuf, sizeof(membuf)); ! copyout_mblk(m, off, MIN(sizeof(membuf), dlen), (char *)membuf); #else dlen = mbufchainlen(m) - off; if (dlen <= 0) return 0; bzero(membuf, sizeof(membuf)); ! m_copydata(m, off, MIN(sizeof(membuf), dlen), (char *)membuf); #endif seq = ntohl(tcp->th_seq); *************** *** 213,219 **** * We only care for the first 19 bytes coming back from the server. */ if (rap->rap_sseq == 0) { ! s = memstr("PNA", membuf, 3, dlen); if (s == NULL) return 0; a1 = s - membuf; --- 213,219 ---- * We only care for the first 19 bytes coming back from the server. */ if (rap->rap_sseq == 0) { ! s = (u_char *)memstr("PNA", (char *)membuf, 3, dlen); if (s == NULL) return 0; a1 = s - membuf; *************** *** 242,291 **** return 0; rap->rap_sdone = 1; ! s = rap->rap_svr + 13; ! rap->rap_srport = (*s << 8) | *(s + 1); swp = ip->ip_p; swa = ip->ip_src; swb = ip->ip_dst; ip->ip_p = IPPROTO_UDP; bcopy((char *)fin, (char *)&fi, sizeof(fi)); bzero((char *)tcp2, sizeof(*tcp2)); fi.fin_dp = (char *)tcp2; fi.fin_fr = &raudiofr; tcp2->th_win = htons(8192); ! if ((rap->rap_mode & RAP_M_UDP_ROBUST) == RAP_M_UDP_ROBUST) { ! ip->ip_src = nat->nat_inip; ! ip->ip_dst = nat->nat_oip; ! sp = rap->rap_srport; ! dp = rap->rap_prport; ! tcp2->th_sport = htons(dp); ! tcp2->th_dport = htons(sp); fi.fin_data[0] = dp; fi.fin_data[1] = sp; ! ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_UDP, NAT_OUTBOUND); if (ipn != NULL) { ipn->nat_age = fr_defnatage; ! (void) fr_addstate(ip, &fi, 0); } - ip->ip_src = swa; - ip->ip_dst = swb; } ! sp = rap->rap_plport; ! ! tcp2->th_sport = htons(sp); ! tcp2->th_dport = 0; /* XXX - don't specify remote port */ ! fi.fin_data[0] = sp; ! fi.fin_data[1] = 0; ! ip->ip_src = nat->nat_inip; ! ip->ip_src = nat->nat_oip; ! ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_UDP|FI_W_DPORT, NAT_OUTBOUND); ! if (ipn != NULL) { ! ipn->nat_age = fr_defnatage; ! (void) fr_addstate(ip, &fi, FI_W_DPORT); } ! ip->ip_p = swp; ip->ip_src = swa; ip->ip_dst = swb; --- 242,298 ---- return 0; rap->rap_sdone = 1; ! s = (u_char *)rap->rap_svr + 11; ! if (((*s << 8) | *(s + 1)) == RA_ID_ROBUST) { ! s += 2; ! rap->rap_srport = (*s << 8) | *(s + 1); ! } ! swp = ip->ip_p; swa = ip->ip_src; swb = ip->ip_dst; + ip->ip_p = IPPROTO_UDP; + ip->ip_src = nat->nat_inip; + ip->ip_dst = nat->nat_oip; + bcopy((char *)fin, (char *)&fi, sizeof(fi)); bzero((char *)tcp2, sizeof(*tcp2)); fi.fin_dp = (char *)tcp2; fi.fin_fr = &raudiofr; tcp2->th_win = htons(8192); ! if (((rap->rap_mode & RAP_M_UDP_ROBUST) == RAP_M_UDP_ROBUST) && ! (rap->rap_srport != 0)) { ! dp = rap->rap_srport; ! sp = rap->rap_prport; ! tcp2->th_sport = htons(sp); ! tcp2->th_dport = htons(dp); fi.fin_data[0] = dp; fi.fin_data[1] = sp; ! ipn = nat_new(nat->nat_ptr, ip, &fi, ! IPN_UDP | (sp ? 0 : FI_W_SPORT), ! NAT_OUTBOUND); if (ipn != NULL) { ipn->nat_age = fr_defnatage; ! (void) fr_addstate(ip, &fi, sp ? 0 : FI_W_SPORT); } } ! if ((rap->rap_mode & RAP_M_UDP) == RAP_M_UDP) { ! sp = rap->rap_plport; ! tcp2->th_sport = htons(sp); ! tcp2->th_dport = 0; /* XXX - don't specify remote port */ ! fi.fin_data[0] = sp; ! fi.fin_data[1] = 0; ! ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_UDP|FI_W_DPORT, ! NAT_OUTBOUND); ! if (ipn != NULL) { ! ipn->nat_age = fr_defnatage; ! (void) fr_addstate(ip, &fi, FI_W_DPORT); ! } } ! ip->ip_p = swp; ip->ip_src = swa; ip->ip_dst = swb; diff -cr ip_fil3.3.4/ip_sfil.c ip_fil3.3.5/ip_sfil.c *** ip_fil3.3.4/ip_sfil.c Tue Oct 5 22:59:08 1999 --- ip_fil3.3.5/ip_sfil.c Sat Dec 11 16:31:10 1999 *************** *** 9,15 **** */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C) 1993-1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_sfil.c,v 2.1.2.2 1999/10/05 12:59:08 darrenr Exp $"; #endif #include --- 9,15 ---- */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C) 1993-1995 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: ip_sfil.c,v 2.1.2.5 1999/12/11 05:31:10 darrenr Exp $"; #endif #include *************** *** 498,511 **** } if (!f) { ! ftail = fprev; ! if (req != SIOCINAFR && req != SIOCINIFR) while ((f = *ftail)) ftail = &f->fr_next; ! else if (fp->fr_hits) ! while (--fp->fr_hits && (f = *ftail)) ! ftail = &f->fr_next; ! f = NULL; } if (req == SIOCDELFR || req == SIOCRMIFR) { --- 498,512 ---- } if (!f) { ! if (req != SIOCINAFR || req != SIOCINIFR) while ((f = *ftail)) ftail = &f->fr_next; ! else { ! if (fp->fr_hits) ! while (--fp->fr_hits && (f = *ftail)) ! ftail = &f->fr_next; ! f = NULL; ! } } if (req == SIOCDELFR || req == SIOCRMIFR) { *************** *** 534,540 **** error = EEXIST; } else { if (unit == IPL_LOGAUTH) { ! error = fr_auth_ioctl(data, req, f, ftail); goto out; } KMALLOC(f, frentry_t *); --- 535,541 ---- error = EEXIST; } else { if (unit == IPL_LOGAUTH) { ! error = fr_auth_ioctl(data, req, fp, ftail); goto out; } KMALLOC(f, frentry_t *); diff -cr ip_fil3.3.4/ipl.h ip_fil3.3.5/ipl.h *** ip_fil3.3.4/ipl.h Sat Dec 4 13:22:09 1999 --- ip_fil3.3.5/ipl.h Thu Dec 9 22:11:33 1999 *************** *** 11,16 **** #ifndef __IPL_H__ #define __IPL_H__ ! #define IPL_VERSION "IP Filter: v3.3.4" #endif --- 11,16 ---- #ifndef __IPL_H__ #define __IPL_H__ ! #define IPL_VERSION "IP Filter: v3.3.5" #endif diff -cr ip_fil3.3.4/parse.c ip_fil3.3.5/parse.c *** ip_fil3.3.4/parse.c Sat Dec 4 13:10:33 1999 --- ip_fil3.3.5/parse.c Sat Dec 11 16:30:26 1999 *************** *** 41,47 **** #if !defined(lint) static const char sccsid[] = "@(#)parse.c 1.44 6/5/96 (C) 1993-1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: parse.c,v 2.1.2.3 1999/12/04 02:10:33 darrenr Exp $"; #endif extern struct ipopt_names ionames[], secclass[]; --- 41,47 ---- #if !defined(lint) static const char sccsid[] = "@(#)parse.c 1.44 6/5/96 (C) 1993-1996 Darren Reed"; ! static const char rcsid[] = "@(#)$Id: parse.c,v 2.1.2.4 1999/12/11 05:30:26 darrenr Exp $"; #endif extern struct ipopt_names ionames[], secclass[]; *************** *** 266,271 **** --- 266,304 ---- fil.fr_flags |= FR_LOGORBLOCK; cpp++; } + if (!strcasecmp(*cpp, "level")) { + int fac, pri; + char *s; + + fac = 0; + pri = 0; + cpp++; + s = index(*cpp, '.'); + if (s) { + *s++ = '\0'; + fac = fac_findname(*cpp); + if (fac == -1) { + fprintf(stderr, "%d: %s %s\n", linenum, + "Unknown facility", *cpp); + return NULL; + } + pri = pri_findname(s); + if (pri == -1) { + fprintf(stderr, "%d: %s %s\n", linenum, + "Unknown priority", s); + return NULL; + } + } else { + pri = pri_findname(*cpp); + if (pri == -1) { + fprintf(stderr, "%d: %s %s\n", linenum, + "Unknown priority", *cpp); + return NULL; + } + } + fil.fr_loglevel = fac|pri; + cpp++; + } } if (!strcasecmp("quick", *cpp)) { *************** *** 1380,1388 **** if (u == NULL) u = "!!!"; if (*s) ! printf("%s.%s ", s, u); else ! printf("%s ", u); } } --- 1413,1421 ---- if (u == NULL) u = "!!!"; if (*s) ! printf("level %s.%s ", s, u); else ! printf("level %s ", u); } } diff -cr ip_fil3.3.4/solaris.c ip_fil3.3.5/solaris.c *** ip_fil3.3.4/solaris.c Sun Nov 28 21:49:11 1999 --- ip_fil3.3.5/solaris.c Sat Dec 4 14:33:59 1999 *************** *** 6,12 **** * to the original author and the contributors. */ /* #pragma ident "@(#)solaris.c 1.12 6/5/96 (C) 1995 Darren Reed"*/ ! #pragma ident "@(#)$Id: solaris.c,v 2.1.2.10 1999/11/28 10:49:11 darrenr Exp $" #include #include --- 6,12 ---- * to the original author and the contributors. */ /* #pragma ident "@(#)solaris.c 1.12 6/5/96 (C) 1995 Darren Reed"*/ ! #pragma ident "@(#)$Id: solaris.c,v 2.1.2.11 1999/12/04 03:33:59 darrenr Exp $" #include #include *************** *** 31,37 **** #include #include #include ! #include #include #include #include --- 31,39 ---- #include #include #include ! #if SOLARIS2 >= 6 ! # include ! #endif #include #include #include *************** *** 140,145 **** --- 142,148 ---- &mod_driverops, IPL_VERSION, &ipf_ops }; static struct modlinkage modlink1 = { MODREV_1, &iplmod, NULL }; + #if SOLARIS2 >= 6 static size_t hdrsizes[57][2] = { { 0, 0 }, { IFT_OTHER, 0 }, *************** *** 197,202 **** --- 200,206 ---- { IFT_PROPVIRTUAL, 0 }, { IFT_PROPMUX, 0 }, }; + #endif /* SOLARIS2 >= 6 */ static dev_info_t *ipf_dev_info = NULL;