aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/route.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bff62fc87b8e..f45f2a12f37b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -902,6 +902,10 @@ static int ip_error(struct sk_buff *skb)
902 bool send; 902 bool send;
903 int code; 903 int code;
904 904
905 /* IP on this device is disabled. */
906 if (!in_dev)
907 goto out;
908
905 net = dev_net(rt->dst.dev); 909 net = dev_net(rt->dst.dev);
906 if (!IN_DEV_FORWARD(in_dev)) { 910 if (!IN_DEV_FORWARD(in_dev)) {
907 switch (rt->dst.error) { 911 switch (rt->dst.error) {