short TCP segments or fragments encapsulated in ESP instead of
fragmented ESP packets. Pass the don't fragment flag down along
the stack so that dynamic routes with MTU are created eventually.
with and OK markus@; OK tobhe@
-/* $OpenBSD: ip_output.c,v 1.361 2021/01/16 07:58:12 claudio Exp $ */
+/* $OpenBSD: ip_output.c,v 1.362 2021/02/01 13:25:04 bluhm Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
m_freem(m);
return EMSGSIZE;
}
+ /* propagate IP_DF for v4-over-v6 */
+ if (ip_mtudisc && ip->ip_off & htons(IP_DF))
+ SET(m->m_pkthdr.csum_flags, M_IPV6_DF_OUT);
/*
* Clear these -- they'll be set in the recursive invocation
-/* $OpenBSD: ip6_output.c,v 1.250 2021/02/01 12:08:50 bluhm Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.251 2021/02/01 13:25:04 bluhm Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
else
dontfrag = 0;
if (dontfrag && tlen > ifp->if_mtu) { /* case 2-b */
+#ifdef IPSEC
+ if (ip_mtudisc)
+ ipsec_adjust_mtu(m, mtu);
+#endif
error = EMSGSIZE;
goto bad;
}
m_freem(m);
return EMSGSIZE;
}
+ /* propagate don't fragment for v6-over-v6 */
+ if (ip_mtudisc)
+ SET(m->m_pkthdr.csum_flags, M_IPV6_DF_OUT);
/*
* Clear these -- they'll be set in the recursive invocation