aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-15 13:43:45 +0100
committerMark Brown <broonie@linaro.org>2013-09-15 13:43:45 +0100
commitdafe3258c5449e2697097285c37c761915053eae (patch)
tree3132efe10ff5766feae3311993cd7eef7e75d6f3 /net/ipv6/icmp.c
parent15812f79511f4b94ee42f35c9095ba0c0cb5204c (diff)
parent4ed4d44eb2192604716226a6f0edad02ab76101f (diff)
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-13.09
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index b4ff0a42b8c..70e704d4900 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -931,6 +931,14 @@ static const struct icmp6_err {
.err = ECONNREFUSED,
.fatal = 1,
},
+ { /* POLICY_FAIL */
+ .err = EACCES,
+ .fatal = 1,
+ },
+ { /* REJECT_ROUTE */
+ .err = EACCES,
+ .fatal = 1,
+ },
};
int icmpv6_err_convert(u8 type, u8 code, int *err)
@@ -942,7 +950,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)
switch (type) {
case ICMPV6_DEST_UNREACH:
fatal = 1;
- if (code <= ICMPV6_PORT_UNREACH) {
+ if (code < ARRAY_SIZE(tab_unreach)) {
*err = tab_unreach[code].err;
fatal = tab_unreach[code].fatal;
}