Date: Tue, 16 Feb 2021 00:46:08 GMT From: Cy Schubert <cy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d81409e2b9ab - stable/13 - MFC 0f34c80f376345b98a972940dd4757e58d7beb06: Message-ID: <202102160046.11G0k8VO006053@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d81409e2b9ab9e8cdae07f97fe1b89afe0d6cf6d commit d81409e2b9ab9e8cdae07f97fe1b89afe0d6cf6d Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2021-01-28 05:50:04 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2021-02-16 00:40:49 +0000 MFC 0f34c80f376345b98a972940dd4757e58d7beb06: Replace the redundant MENTAT macro with SOLARIS. MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. (cherry picked from commit 0f34c80f376345b98a972940dd4757e58d7beb06) --- contrib/ipfilter/ip_fil_compat.c | 50 +++++++++++++++---------------- contrib/ipfilter/tools/ipmon.c | 4 +-- sys/contrib/ipfilter/netinet/fil.c | 24 +++++++-------- sys/contrib/ipfilter/netinet/ip_auth.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_auth.h | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 10 +++---- sys/contrib/ipfilter/netinet/ip_irc_pxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_log.c | 4 +-- sys/contrib/ipfilter/netinet/ip_nat.c | 18 +++++------ sys/contrib/ipfilter/netinet/ip_nat6.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_proxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_state.c | 2 +- 13 files changed, 69 insertions(+), 71 deletions(-) diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index fbcfc8a0088f..6184502e0f58 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -333,7 +333,7 @@ typedef struct fr_info_4_1_32 { ip_t *ofin_ip; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -371,7 +371,7 @@ typedef struct fr_info_4_1_24 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -408,7 +408,7 @@ typedef struct fr_info_4_1_23 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -444,7 +444,7 @@ typedef struct fr_info_4_1_11 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -933,7 +933,7 @@ typedef struct frauth_4_1_32 { fr_info_4_1_32_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -947,7 +947,7 @@ typedef struct frauth_4_1_29 { fr_info_4_1_24_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -960,7 +960,7 @@ typedef struct frauth_4_1_24 { u_32_t fra_pass; fr_info_4_1_24_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -973,7 +973,7 @@ typedef struct frauth_4_1_23 { u_32_t fra_pass; fr_info_4_1_23_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -986,7 +986,7 @@ typedef struct frauth_4_1_11 { u_32_t fra_pass; fr_info_4_1_11_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -2533,7 +2533,7 @@ frauth_4_1_32_to_current(old, current) fr_info_4_1_32_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2554,7 +2554,7 @@ frauth_4_1_29_to_current(old, current) fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2574,7 +2574,7 @@ frauth_4_1_24_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2594,7 +2594,7 @@ frauth_4_1_23_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_23_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2614,7 +2614,7 @@ frauth_4_1_11_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_11_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2652,7 +2652,7 @@ fr_info_4_1_32_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2690,7 +2690,7 @@ fr_info_4_1_24_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2727,7 +2727,7 @@ fr_info_4_1_23_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2764,7 +2764,7 @@ fr_info_4_1_11_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -4039,7 +4039,7 @@ fr_info_current_to_4_1_24(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4079,7 +4079,7 @@ fr_info_current_to_4_1_23(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4119,7 +4119,7 @@ fr_info_current_to_4_1_11(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4141,7 +4141,7 @@ frauth_current_to_4_1_29(current, old) fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; old->fra_flx = fra->fra_flx; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4161,7 +4161,7 @@ frauth_current_to_4_1_24(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4181,7 +4181,7 @@ frauth_current_to_4_1_23(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_23(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4201,7 +4201,7 @@ frauth_current_to_4_1_11(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_11(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index 005cd316f91a..f14cef832722 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -108,7 +108,7 @@ char *reasons[] = { "natv6_in-fail", }; -#ifdef MENTAT +#if SOLARIS static char *pidfile = "/etc/opt/ipf/ipmon.pid"; #else static char *pidfile = "/var/run/ipmon.pid"; @@ -1108,7 +1108,7 @@ static void print_ipflog(conf, buf, blen) ifname[sizeof(ipf->fl_ifname)] = '\0'; sprintf(t, "%s", ifname); t += strlen(t); -# if defined(MENTAT) +# if SOLARIS if (ISALPHA(*(t - 1))) { sprintf(t, "%d", ipf->fl_unit); t += strlen(t); diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index a79d441284bf..2dca1e754b9e 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -2805,7 +2805,7 @@ ipf_firewall(fin, passp) /* ------------------------------------------------------------------------ */ int ipf_check(ctx, ip, hlen, ifp, out -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS , qif, mp) void *qif; #else @@ -2837,7 +2837,7 @@ ipf_check(ctx, ip, hlen, ifp, out * to hold all the required packet headers. */ #ifdef _KERNEL -# ifdef MENTAT +# if SOLARIS qpktinfo_t *qpi = qif; # ifdef __sparc @@ -2854,7 +2854,7 @@ ipf_check(ctx, ip, hlen, ifp, out bzero((char *)fin, sizeof(*fin)); -# ifdef MENTAT +# if SOLARIS if (qpi->qpi_flags & QF_BROADCAST) fin->fin_flx |= FI_MBCAST|FI_BROADCAST; if (qpi->qpi_flags & QF_MULTICAST) @@ -2862,7 +2862,7 @@ ipf_check(ctx, ip, hlen, ifp, out m = qpi->qpi_m; fin->fin_qfm = m; fin->fin_qpi = qpi; -# else /* MENTAT */ +# else /* SOLARIS */ m = *mp; @@ -2895,7 +2895,7 @@ ipf_check(ctx, ip, hlen, ifp, out m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } # endif /* CSUM_DELAY_DATA */ -# endif /* MENTAT */ +# endif /* SOLARIS */ #else bzero((char *)fin, sizeof(*fin)); m = *mp; @@ -6156,7 +6156,7 @@ ipf_getifname(ifp, buffer) char *buffer; { static char namebuf[LIFNAMSIZ]; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) int unit, space; char temp[20]; char *s; @@ -6166,7 +6166,7 @@ ipf_getifname(ifp, buffer) buffer = namebuf; (void) strncpy(buffer, ifp->if_name, LIFNAMSIZ); buffer[LIFNAMSIZ - 1] = '\0'; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) for (s = buffer; *s; s++) ; unit = ifp->if_unit; @@ -6916,7 +6916,7 @@ ipf_coalesce(fin) DT1(frb_coalesce, fr_info_t *, fin); LBUMP(ipf_stats[fin->fin_out].fr_badcoalesces); -# ifdef MENTAT +# if SOLARIS FREE_MB_T(*fin->fin_mp); # endif fin->fin_reason = FRB_COALESCE; @@ -8397,7 +8397,7 @@ ipf_ipf_ioctl(softc, data, cmd, mode, uid, ctx) error = EPERM; } else { WRITE_ENTER(&softc->ipf_global); -#if (defined(MENTAT) && defined(_KERNEL)) && !defined(INSTANCES) +#if (SOLARIS && defined(_KERNEL)) && !defined(INSTANCES) error = ipfsync(); #else ipf_sync(softc, NULL); @@ -8570,7 +8570,7 @@ ipf_decaps(fin, pass, l5proto) fino = fin; fin = &fin2; elen = hlen; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += elen; #else m->m_data += elen; @@ -8609,7 +8609,7 @@ ipf_decaps(fin, pass, l5proto) if (ipf_makefrip(hlen, ip, fin) == -1) { cantdecaps2: if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; @@ -8642,7 +8642,7 @@ cantdecaps: fino->fin_m = fin->fin_m; m = fin->fin_m; if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 4864a8128494..c40bb1b435f2 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -94,7 +94,7 @@ #include <netinet/tcpip.h> #include "netinet/ip_fil.h" #include "netinet/ip_auth.h" -#if !defined(MENTAT) +#if !SOLARIS # include <net/netisr.h> # ifdef __FreeBSD__ # include <machine/cpufunc.h> @@ -466,7 +466,7 @@ ipf_auth_new(m, fin) { ipf_main_softc_t *softc = fin->fin_main_soft; ipf_auth_softc_t *softa = softc->ipf_auth_soft; -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS qpktinfo_t *qpi = fin->fin_qpi; #endif frauth_t *fra; @@ -508,7 +508,7 @@ ipf_auth_new(m, fin) * them. */ ip = fin->fin_ip; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) if ((ip == (ip_t *)m->b_rptr) && (fin->fin_v == 4)) # endif { diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h index e914dacacdf0..17df74c31de6 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.h +++ b/sys/contrib/ipfilter/netinet/ip_auth.h @@ -22,7 +22,7 @@ typedef struct frauth { fr_info_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 756731480836..490e939f7f37 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -448,7 +448,7 @@ typedef struct ip6_hdr ip6_t; #endif #if defined(_KERNEL) -# if defined(MENTAT) && !defined(INSTANCES) +# if SOLARIS && !defined(INSTANCES) # define COPYDATA mb_copydata # define COPYBACK mb_copyback # else diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 0b5fc7285f93..72def439b3e8 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -402,7 +402,7 @@ typedef struct fr_info { } fin_ipu; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -1626,8 +1626,7 @@ extern void ipfilterattach(int); # endif extern int ipl_enable(void); extern int ipl_disable(void); -# ifdef MENTAT -/* XXX MENTAT is always defined for Solaris */ +# if SOLARIS extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **); # if SOLARIS @@ -1635,8 +1634,7 @@ extern void ipf_prependmbt(fr_info_t *, mblk_t *); extern int ipfioctl(dev_t, int, intptr_t, int, cred_t *, int *); # endif extern int ipf_qout(queue_t *, mblk_t *); -# else /* MENTAT */ -/* XXX MENTAT is never defined for FreeBSD & NetBSD */ +# else /* SOLARIS */ extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); @@ -1648,7 +1646,7 @@ extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif -# endif /* MENTAT */ +# endif /* SOLARIS */ # if defined(__FreeBSD_version) extern int ipf_pfil_hook(void); diff --git a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c index 304fe0c35351..4446b2100645 100644 --- a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c @@ -267,7 +267,7 @@ ipf_p_irc_send(fin, nat) u_int a1; ip_t *ip; mb_t *m; -#ifdef MENTAT +#if SOLARIS mb_t *m1; #endif softc = fin->fin_main_soft; @@ -322,7 +322,7 @@ ipf_p_irc_send(fin, nat) if ((inc + fin->fin_plen) > 65535) return 0; -#ifdef MENTAT +#if SOLARIS for (m1 = m; m1->b_cont; m1 = m1->b_cont) ; if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) { @@ -357,7 +357,7 @@ ipf_p_irc_send(fin, nat) fin->fin_flx |= FI_DOCKSUM; if (inc != 0) { -#if defined(MENTAT) +#if SOLARIS register u_32_t sum1, sum2; sum1 = fin->fin_plen; diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index 76d2e3def1fa..e5bf6a78bf1b 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -488,7 +488,7 @@ ipf_log_pkt(fin, flags) ptrs[0] = (void *)&ipfl; sizes[0] = sizeof(ipfl); types[0] = 0; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) /* * Are we copied from the mblk or an aligned array ? */ @@ -505,7 +505,7 @@ ipf_log_pkt(fin, flags) ptrs[1] = m; sizes[1] = hlen + mlen; types[1] = 1; -# endif /* MENTAT */ +# endif /* SOLARIS */ return ipf_log_items(softc, IPL_LOGIPF, fin, ptrs, sizes, types, 2); } diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index bc0883ac7382..17c1133e145d 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -3661,7 +3661,7 @@ ipf_nat_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -5116,7 +5116,7 @@ ipf_nat_out(fin, nat, natadd, nflags) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0); } -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) else { /* @@ -5179,7 +5179,7 @@ ipf_nat_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -5228,7 +5228,7 @@ ipf_nat_out(fin, nat, natadd, nflags) uh = (udphdr_t *)(ip + 1); uh->uh_ulen += fin->fin_plen; uh->uh_ulen = htons(uh->uh_ulen); -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif @@ -5631,7 +5631,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_ndstip; fin->fin_daddr = nat->nat_ndstaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5648,7 +5648,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_incksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5680,7 +5680,7 @@ ipf_nat_in(fin, nat, natadd, nflags) sum2 += ntohs(ip->ip_off) & IP_DF; CALC_SUMD(sum1, sum2, sumd); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif PREP_MB_T(fin, m); @@ -5706,7 +5706,7 @@ ipf_nat_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -7429,7 +7429,7 @@ ipf_nat_decap(fin, nat) CALC_SUMD(sum1, sum2, sumd); fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, sumd, 0); #endif } diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 388ee9a67e73..b2713aec812a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -1434,7 +1434,7 @@ ipf_nat6_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip6 + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -2858,7 +2858,7 @@ ipf_nat6_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -3321,7 +3321,7 @@ ipf_nat6_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 227ca817f6e4..2c6b4eb6369d 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -914,7 +914,7 @@ ipf_proxy_check(fin, nat) ip_t *ip; short rv; int err; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS u_32_t s1, s2, sd; #endif @@ -942,7 +942,7 @@ ipf_proxy_check(fin, nat) * If there is data in this packet to be proxied then try and * get it all into the one buffer, else drop it. */ -#if defined(MENTAT) || defined(HAVE_M_PULLDOWN) +#if SOLARIS || defined(HAVE_M_PULLDOWN) if ((fin->fin_dlen > 0) && !(fin->fin_flx & FI_COALESCE)) if (ipf_coalesce(fin) == -1) { if (softp->ips_proxy_debug & 0x08) @@ -1006,7 +1006,7 @@ ipf_proxy_check(fin, nat) * packet. */ adjlen = APR_INC(err); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS s1 = LONG_SUM(fin->fin_plen - adjlen); s2 = LONG_SUM(fin->fin_plen); CALC_SUMD(s1, s2, sd); diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 45a641fd86a2..a050a2d324d2 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2739,7 +2739,7 @@ ipf_checkicmpmatchingstate(fin) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + len > (char *)m->b_wptr) { SBUMPDX(ipf_state_stats, iss_icmp_short, iss_icmp_short_2); return NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102160046.11G0k8VO006053>