mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
ipv4: Do not cache routing failures due to disabled forwarding.
If we cache them, the kernel will reuse them, independently of whether forwarding is enabled or not. Which means that if forwarding is disabled on the input interface where the first routing request comes from, then that unreachable result will be cached and reused for other interfaces, even if forwarding is enabled on them. The opposite is also true. This can be verified with two interfaces A and B and an output interface C, where B has forwarding enabled, but not A and trying ip route get $dst iif A from $src && ip route get $dst iif B from $src Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Reviewed-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e327c225c9
commit
fa19c2b050
1 changed files with 1 additions and 0 deletions
|
@ -1798,6 +1798,7 @@ out: return err;
|
||||||
no_route:
|
no_route:
|
||||||
RT_CACHE_STAT_INC(in_no_route);
|
RT_CACHE_STAT_INC(in_no_route);
|
||||||
res.type = RTN_UNREACHABLE;
|
res.type = RTN_UNREACHABLE;
|
||||||
|
res.fi = NULL;
|
||||||
goto local_input;
|
goto local_input;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue