Lines Matching refs:m0

2535 	struct mbuf	*m0;
2538 m0 = m_copy(m, 0, M_COPYALL);
2539 if (m0 == NULL)
2542 if ((pf_mtag = pf_get_mtag(m0)) == NULL)
2556 pf_mtag->pftag_hdr = mtod(m0, struct ip *);
2576 icmp_error(m0, type, code, 0, 0);
2581 icmp6_error(m0, type, code, 0);
5091 struct mbuf **m0, struct pf_pdesc *pd, struct ip_fw_args *fwa)
5093 struct mbuf *m = *m0;
5340 *m0 = NULL;
7615 struct mbuf *m0, *m1;
7631 m0 = *m;
7637 if ((m0 = m_copym(*m, 0, M_COPYALL, M_NOWAIT)) == NULL)
7642 m0 = *m;
7645 if (m0->m_len < (int)sizeof (struct ip)) {
7647 ("pf_route: m0->m_len < sizeof (struct ip)\n"));
7651 ip = mtod(m0, struct ip *);
7698 if (pf_test(PF_OUT, ifp, &m0, NULL, NULL) != PF_PASS)
7700 else if (m0 == NULL)
7702 if (m0->m_len < (int)sizeof (struct ip)) {
7704 ("pf_route: m0->m_len < sizeof (struct ip)\n"));
7707 ip = mtod(m0, struct ip *);
7713 m0->m_pkthdr.csum_flags |= CSUM_IP;
7714 sw_csum = m0->m_pkthdr.csum_flags &
7723 if (apple_hwcksum_tx && (m0->m_pkthdr.csum_flags & CSUM_TCP) &&
7732 u_short csumprev = m0->m_pkthdr.csum_data & 0xffff;
7733 m0->m_pkthdr.csum_flags = CSUM_DATA_VALID |
7735 m0->m_pkthdr.csum_data = (csumprev + offset) << 16 ;
7736 m0->m_pkthdr.csum_data += offset;
7741 sw_csum |= (CSUM_DELAY_DATA & m0->m_pkthdr.csum_flags);
7745 m0->m_pkthdr.csum_flags;
7749 in_delayed_cksum(m0);
7751 m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
7755 m0->m_pkthdr.csum_flags &=
7758 m0->m_pkthdr.csum_flags = 0;
7765 ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
7766 error = ifnet_output(ifp, PF_INET, m0, ro->ro_rt, sintosa(dst));
7777 icmp_error(m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0,
7784 m1 = m0;
7791 error = ip_fragment(m0, ifp, ifp->if_mtu, sw_csum);
7794 m0 = NULL;
7798 for (m0 = m1; m0; m0 = m1) {
7799 m1 = m0->m_nextpkt;
7800 m0->m_nextpkt = 0;
7802 error = ifnet_output(ifp, PF_INET, m0, ro->ro_rt,
7805 m_freem(m0);
7819 m_freem(m0);
7830 struct mbuf *m0;
7845 m0 = *m;
7851 if ((m0 = m_copym(*m, 0, M_COPYALL, M_NOWAIT)) == NULL)
7856 m0 = *m;
7859 if (m0->m_len < (int)sizeof (struct ip6_hdr)) {
7861 ("pf_route6: m0->m_len < sizeof (struct ip6_hdr)\n"));
7864 ip6 = mtod(m0, struct ip6_hdr *);
7877 if ((pf_mtag = pf_get_mtag(m0)) == NULL)
7880 ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL);
7906 if (pf_test6(PF_OUT, ifp, &m0, NULL, NULL) != PF_PASS)
7908 else if (m0 == NULL)
7910 if (m0->m_len < (int)sizeof (struct ip6_hdr)) {
7911 DPFPRINTF(PF_DEBUG_URGENT, ("pf_route6: m0->m_len "
7915 ip6 = mtod(m0, struct ip6_hdr *);
7924 if ((unsigned)m0->m_pkthdr.len <= ifp->if_mtu) {
7925 error = nd6_output(ifp, ifp, m0, dst, NULL, NULL);
7929 icmp6_error(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu);
7940 m_freem(m0);
8046 pf_test(int dir, struct ifnet *ifp, struct mbuf **m0,
8054 struct mbuf *m = *m0;
8123 action = pf_normalize_ip(m0, dir, kif, &reason, &pd);
8124 pd.mp = m = *m0;
8133 m = *m0; /* pf_normalize messes with m0 */
8171 *m0 = NULL;
8197 *m0 = NULL;
8245 *m0 = NULL;
8280 *m0 = NULL;
8315 *m0 = NULL;
8348 *m0 = NULL;
8388 *m0 = NULL;
8410 *m0 = pd.mp;
8541 if (*m0) {
8548 m_freem(*m0);
8549 *m0 = NULL;
8553 *m0 = m;
8557 m_freem(*m0);
8558 *m0 = NULL;
8561 /* pf_route can free the mbuf causing *m0 to become NULL */
8562 pf_route(m0, r, dir, kif->pfik_ifp, s, &pd);
8580 pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
8588 struct mbuf *m = *m0, *n = NULL;
8667 action = pf_normalize_ip6(m0, dir, kif, &reason, &pd);
8668 pd.mp = m = *m0;
8727 *m0 = NULL;
8791 *m0 = NULL;
8839 *m0 = NULL;
8874 *m0 = NULL;
8909 *m0 = NULL;
8943 *m0 = NULL;
8983 *m0 = NULL;
9005 *m0 = pd.mp;
9134 m_freem(*m0);
9135 *m0 = NULL;
9138 /* pf_route6 can free the mbuf causing *m0 to become NULL */
9139 pf_route6(m0, r, dir, kif->pfik_ifp, s, &pd);
9143 if (*m0) {
9150 m_freem(*m0);
9151 *m0 = NULL;
9155 *m0 = m;
9159 m_freem(*m0);
9160 *m0 = NULL;
9164 m = *m0;
9168 /* pf_route6 can free the mbuf causing *m0 to become NULL */
9169 pf_route6(m0, r, dir, kif->pfik_ifp, s, &pd);