Remove some further INET related symbols from pf to allow the module
to not only compile bu load as well for testing with IPv6-only kernels. For the moment we ignore the csum change in pf_ioctl.c given the pending update to pf45. Reported by: dru Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days
This commit is contained in:
parent
decedfc4f9
commit
06034940f5
@ -6132,9 +6132,11 @@ pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kif *kif)
|
|||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
/* XXX MRT not always INET */ /* stick with table 0 though */
|
/* XXX MRT not always INET */ /* stick with table 0 though */
|
||||||
|
#ifdef INET
|
||||||
if (af == AF_INET)
|
if (af == AF_INET)
|
||||||
in_rtalloc_ign((struct route *)&ro, 0, 0);
|
in_rtalloc_ign((struct route *)&ro, 0, 0);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
rtalloc_ign((struct route *)&ro, 0);
|
rtalloc_ign((struct route *)&ro, 0);
|
||||||
#else /* ! __FreeBSD__ */
|
#else /* ! __FreeBSD__ */
|
||||||
rtalloc_noclone((struct route *)&ro, NO_CLONING);
|
rtalloc_noclone((struct route *)&ro, NO_CLONING);
|
||||||
@ -6214,9 +6216,11 @@ pf_rtlabel_match(struct pf_addr *addr, sa_family_t af, struct pf_addr_wrap *aw)
|
|||||||
# ifdef RTF_PRCLONING
|
# ifdef RTF_PRCLONING
|
||||||
rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING));
|
rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING));
|
||||||
# else /* !RTF_PRCLONING */
|
# else /* !RTF_PRCLONING */
|
||||||
|
#ifdef INET
|
||||||
if (af == AF_INET)
|
if (af == AF_INET)
|
||||||
in_rtalloc_ign((struct route *)&ro, 0, 0);
|
in_rtalloc_ign((struct route *)&ro, 0, 0);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
rtalloc_ign((struct route *)&ro, 0);
|
rtalloc_ign((struct route *)&ro, 0);
|
||||||
# endif
|
# endif
|
||||||
#else /* ! __FreeBSD__ */
|
#else /* ! __FreeBSD__ */
|
||||||
@ -6789,11 +6793,13 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, sa_family_t a
|
|||||||
KMOD_UDPSTAT_INC(udps_badsum);
|
KMOD_UDPSTAT_INC(udps_badsum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef INET
|
||||||
case IPPROTO_ICMP:
|
case IPPROTO_ICMP:
|
||||||
{
|
{
|
||||||
KMOD_ICMPSTAT_INC(icps_checksum);
|
KMOD_ICMPSTAT_INC(icps_checksum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
case IPPROTO_ICMPV6:
|
case IPPROTO_ICMPV6:
|
||||||
{
|
{
|
||||||
@ -6889,9 +6895,11 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p,
|
|||||||
case IPPROTO_UDP:
|
case IPPROTO_UDP:
|
||||||
KMOD_UDPSTAT_INC(udps_badsum);
|
KMOD_UDPSTAT_INC(udps_badsum);
|
||||||
break;
|
break;
|
||||||
|
#ifdef INET
|
||||||
case IPPROTO_ICMP:
|
case IPPROTO_ICMP:
|
||||||
KMOD_ICMPSTAT_INC(icps_checksum);
|
KMOD_ICMPSTAT_INC(icps_checksum);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
case IPPROTO_ICMPV6:
|
case IPPROTO_ICMPV6:
|
||||||
KMOD_ICMP6STAT_INC(icp6s_checksum);
|
KMOD_ICMP6STAT_INC(icp6s_checksum);
|
||||||
|
@ -3735,9 +3735,12 @@ pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
|
|||||||
*/
|
*/
|
||||||
int chk;
|
int chk;
|
||||||
|
|
||||||
/* We need a proper CSUM befor we start (s. OpenBSD ip_output) */
|
/* We need a proper CSUM before we start (s. OpenBSD ip_output) */
|
||||||
if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
|
if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
|
||||||
|
#ifdef INET
|
||||||
|
/* XXX-BZ copy&paste error from r126261? */
|
||||||
in_delayed_cksum(*m);
|
in_delayed_cksum(*m);
|
||||||
|
#endif
|
||||||
(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
|
(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
|
||||||
}
|
}
|
||||||
chk = pf_test6(PF_OUT, ifp, m, NULL, inp);
|
chk = pf_test6(PF_OUT, ifp, m, NULL, inp);
|
||||||
|
@ -949,6 +949,7 @@ pf_fragcache(struct mbuf **m0, struct ip *h, struct pf_fragment **frag, int mff,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef INET
|
||||||
int
|
int
|
||||||
pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason,
|
pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason,
|
||||||
struct pf_pdesc *pd)
|
struct pf_pdesc *pd)
|
||||||
@ -1198,6 +1199,7 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason,
|
|||||||
|
|
||||||
return (PF_DROP);
|
return (PF_DROP);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user