From f8707400087361394703271b412477ff41583ab6 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 27 Nov 2024 16:27:42 +0200 Subject: [PATCH] ip6_output(): if mtu is not yet computed for ipsec hook, use ifp mtu Sponsored by: NVidia networking --- sys/netinet6/ip6_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 7eea64bb63445e..9e4985cdc6cde3 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -798,7 +798,8 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, error = ENOBUFS; goto bad; } - if ((error = IPSEC_OUTPUT(ipv6, ifp, m, inp, mtu)) != 0) { + if ((error = IPSEC_OUTPUT(ipv6, ifp, m, inp, mtu == 0 ? + ifp->if_mtu : mtu)) != 0) { if (error == EINPROGRESS) error = 0; goto done;