diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-27 05:12:14 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-27 05:12:14 +0000 |
commit | a35217ef46c022b2311f7b08d03480f3ef4b4978 (patch) | |
tree | a32f7d58df1b5217a97901a0c50591d3c8b3d19a | |
parent | 3ec9d9f20a5eb8e2025c6a5eba8af1ebae8c222e (diff) |
correct rhlen computation (if the "if" clause on the next line is taken,
we will use rhlen uninitialized). checked with kame
-rw-r--r-- | sys/netinet6/route6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c index 46828d2cb69..c0015d36af1 100644 --- a/sys/netinet6/route6.c +++ b/sys/netinet6/route6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6.c,v 1.13 2006/12/09 01:12:28 itojun Exp $ */ +/* $OpenBSD: route6.c,v 1.14 2006/12/27 05:12:13 itojun Exp $ */ /* $KAME: route6.c,v 1.22 2000/12/03 00:54:00 itojun Exp $ */ /* @@ -65,9 +65,9 @@ route6_input(mp, offp, proto) switch (rh->ip6r_type) { case IPV6_RTHDR_TYPE_0: + rhlen = (rh->ip6r_len + 1) << 3; if (rh->ip6r_segleft == 0) break; /* Final dst. Just ignore the header. */ - rhlen = (rh->ip6r_len + 1) << 3; /* * note on option length: * maximum rhlen: 2048 |