-/* $OpenBSD: ip6_output.c,v 1.232 2017/09/01 15:05:31 mpi Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.233 2018/02/11 00:24:13 dlg Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
*/
tlen = m->m_pkthdr.len;
- if (opt && (opt->ip6po_flags & IP6PO_DONTFRAG))
+ if (ISSET(m->m_pkthdr.csum_flags, M_IPV6_DF_OUT)) {
+ CLR(m->m_pkthdr.csum_flags, M_IPV6_DF_OUT);
+ dontfrag = 1;
+ } else if (opt && ISSET(opt->ip6po_flags, IP6PO_DONTFRAG))
dontfrag = 1;
else
dontfrag = 0;
-/* $OpenBSD: mbuf.h,v 1.234 2018/02/09 02:26:33 patrick Exp $ */
+/* $OpenBSD: mbuf.h,v 1.235 2018/02/11 00:24:13 dlg Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
#define M_ICMP_CSUM_OUT 0x0200 /* ICMP/ICMPv6 checksum needed */
#define M_ICMP_CSUM_IN_OK 0x0400 /* ICMP/ICMPv6 checksum verified */
#define M_ICMP_CSUM_IN_BAD 0x0800 /* ICMP/ICMPv6 checksum bad */
+#define M_IPV6_DF_OUT 0x1000 /* don't fragment outgoing IPv6 */
#ifdef _KERNEL
#define MCS_BITS \
("\20\1IPV4_CSUM_OUT\2TCP_CSUM_OUT\3UDP_CSUM_OUT\4IPV4_CSUM_IN_OK" \
"\5IPV4_CSUM_IN_BAD\6TCP_CSUM_IN_OK\7TCP_CSUM_IN_BAD\10UDP_CSUM_IN_OK" \
- "\11UDP_CSUM_IN_BAD\12ICMP_CSUM_OUT\13ICMP_CSUM_IN_OK\14ICMP_CSUM_IN_BAD")
+ "\11UDP_CSUM_IN_BAD\12ICMP_CSUM_OUT\13ICMP_CSUM_IN_OK\14ICMP_CSUM_IN_BAD" \
+ "\15IPV6_NODF_OUT")
#endif
/* mbuf types */