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;