-/* $OpenBSD: pf.c,v 1.1176 2023/05/07 16:23:23 bluhm Exp $ */
+/* $OpenBSD: pf.c,v 1.1177 2023/05/08 13:22:13 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
ip = mtod(m0, struct ip *);
}
- in_proto_cksum_out(m0, ifp);
-
if (ntohs(ip->ip_len) <= ifp->if_mtu) {
ip->ip_sum = 0;
if (ifp->if_capabilities & IFCAP_CSUM_IPv4)
ipstat_inc(ips_outswcsum);
ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
}
+ in_proto_cksum_out(m0, ifp);
ifp->if_output(ifp, m0, sintosa(dst), rt);
goto done;
}
}
}
- in6_proto_cksum_out(m0, ifp);
-
/*
* If packet has been reassembled by PF earlier, we have to
* use pf_refragment6() here to turn it back to fragments.
}
if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) {
+ in6_proto_cksum_out(m0, ifp);
ifp->if_output(ifp, m0, sin6tosa(dst), rt);
goto done;
}
-/* $OpenBSD: ip_output.c,v 1.383 2023/05/07 16:23:23 bluhm Exp $ */
+/* $OpenBSD: ip_output.c,v 1.384 2023/05/08 13:22:13 bluhm Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
goto reroute;
}
#endif
- in_proto_cksum_out(m, ifp);
#ifdef IPSEC
if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) &&
ipstat_inc(ips_outswcsum);
ip->ip_sum = in_cksum(m, hlen);
}
-
+ in_proto_cksum_out(m, ifp);
error = ifp->if_output(ifp, m, sintosa(dst), ro->ro_rt);
goto done;
}
-/* $OpenBSD: ip6_output.c,v 1.273 2023/05/07 16:23:24 bluhm Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.274 2023/05/08 13:22:13 bluhm Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
ip6->ip6_dst.s6_addr16[1] = dst_scope;
}
- in6_proto_cksum_out(m, ifp);
-
/*
* Send the packet to the outgoing interface.
* If necessary, do IPv6 fragmentation before sending.
* transmit packet without fragmentation
*/
if (dontfrag || (tlen <= mtu)) { /* case 1-a and 2-a */
+ in6_proto_cksum_out(m, ifp);
error = ifp->if_output(ifp, m, sin6tosa(dst), ro->ro_rt);
goto done;
}