diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 73681c227453..eef8d945b362 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -940,6 +940,14 @@ static const struct icmp6_err { | |||
940 | .err = ECONNREFUSED, | 940 | .err = ECONNREFUSED, |
941 | .fatal = 1, | 941 | .fatal = 1, |
942 | }, | 942 | }, |
943 | { /* POLICY_FAIL */ | ||
944 | .err = EACCES, | ||
945 | .fatal = 1, | ||
946 | }, | ||
947 | { /* REJECT_ROUTE */ | ||
948 | .err = EACCES, | ||
949 | .fatal = 1, | ||
950 | }, | ||
943 | }; | 951 | }; |
944 | 952 | ||
945 | int icmpv6_err_convert(u8 type, u8 code, int *err) | 953 | int icmpv6_err_convert(u8 type, u8 code, int *err) |
@@ -951,7 +959,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err) | |||
951 | switch (type) { | 959 | switch (type) { |
952 | case ICMPV6_DEST_UNREACH: | 960 | case ICMPV6_DEST_UNREACH: |
953 | fatal = 1; | 961 | fatal = 1; |
954 | if (code <= ICMPV6_PORT_UNREACH) { | 962 | if (code < ARRAY_SIZE(tab_unreach)) { |
955 | *err = tab_unreach[code].err; | 963 | *err = tab_unreach[code].err; |
956 | fatal = tab_unreach[code].fatal; | 964 | fatal = tab_unreach[code].fatal; |
957 | } | 965 | } |