diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-07-22 07:39:07 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-07-22 07:39:07 +0000 |
commit | 4aa7a21f6094125b43feee8bd294859f13e0596e (patch) | |
tree | 05ccd071df608b83aa5e675447dd31755b6aa73b | |
parent | 8049867a1079dba5353d4841fab64bc2e05a7f97 (diff) |
Fix a double rtfree(9) triggered when IPSEC inserts a more specific
route because of PMTU.
otto@ reported the issue and helped me tracking it down during more
than one month, he is the man!
mikeb@ figured out the bug was in the forwarding path.
ok mikeb@, deraadt@, claudio@
-rw-r--r-- | sys/netinet/ip_input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 51f9986e9f6..a1b33c6667b 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.278 2016/07/18 13:17:44 bluhm Exp $ */ +/* $OpenBSD: ip_input.c,v 1.279 2016/07/22 07:39:06 mpi Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1488,6 +1488,7 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, struct rtentry *rt, int srcrt) error = ip_output(m, NULL, &ro, (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)), NULL, NULL, 0); + rt = ro.ro_rt; if (error) ipstat.ips_cantforward++; else { |