diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 80cf633d9f4a..12a1cf306f67 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1909,7 +1909,7 @@ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, | |||
1909 | */ | 1909 | */ |
1910 | if ((err = fib_lookup(&fl, &res)) != 0) { | 1910 | if ((err = fib_lookup(&fl, &res)) != 0) { |
1911 | if (!IN_DEV_FORWARD(in_dev)) | 1911 | if (!IN_DEV_FORWARD(in_dev)) |
1912 | goto e_inval; | 1912 | goto e_hostunreach; |
1913 | goto no_route; | 1913 | goto no_route; |
1914 | } | 1914 | } |
1915 | free_res = 1; | 1915 | free_res = 1; |
@@ -1933,7 +1933,7 @@ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, | |||
1933 | } | 1933 | } |
1934 | 1934 | ||
1935 | if (!IN_DEV_FORWARD(in_dev)) | 1935 | if (!IN_DEV_FORWARD(in_dev)) |
1936 | goto e_inval; | 1936 | goto e_hostunreach; |
1937 | if (res.type != RTN_UNICAST) | 1937 | if (res.type != RTN_UNICAST) |
1938 | goto martian_destination; | 1938 | goto martian_destination; |
1939 | 1939 | ||
@@ -2025,6 +2025,11 @@ martian_destination: | |||
2025 | "%u.%u.%u.%u, dev %s\n", | 2025 | "%u.%u.%u.%u, dev %s\n", |
2026 | NIPQUAD(daddr), NIPQUAD(saddr), dev->name); | 2026 | NIPQUAD(daddr), NIPQUAD(saddr), dev->name); |
2027 | #endif | 2027 | #endif |
2028 | |||
2029 | e_hostunreach: | ||
2030 | err = -EHOSTUNREACH; | ||
2031 | goto done; | ||
2032 | |||
2028 | e_inval: | 2033 | e_inval: |
2029 | err = -EINVAL; | 2034 | err = -EINVAL; |
2030 | goto done; | 2035 | goto done; |