diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-01-09 20:25:47 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-01-09 20:25:47 +0000 |
commit | f7ce9c3a5652c25ce851a15a51bfb99ad5c2a7ff (patch) | |
tree | 0785bb5f6aca07a67719051a43fb941708c2f90a /sys | |
parent | 7183de2a49af2bc8ec1654da282abfa30170a00a (diff) |
In ip6_forward() only one call to icmp6_error() was not protected
by an if (mcopy). The variable mcopy comes from m_copy() and could
be NULL. Bring this call in line with all the other icmp6_error()
calls.
ok henning@, claudio@, markus@, mpf@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 7904a23581c..210df948d91 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_forward.c,v 1.49 2010/07/09 16:58:06 reyk Exp $ */ +/* $OpenBSD: ip6_forward.c,v 1.50 2011/01/09 20:25:46 bluhm Exp $ */ /* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */ /* @@ -425,7 +425,8 @@ reroute: * type/code is based on suggestion by Rich Draves. * not sure if it is the best pick. */ - icmp6_error(mcopy, ICMP6_DST_UNREACH, + if (mcopy) + icmp6_error(mcopy, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADDR, 0); m_freem(m); goto freert; |