ipv4: Skip calling fib_detect_death() if fib_dev is NULL
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 26 Nov 2012 20:52:31 +0000 (12:52 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 26 Nov 2012 20:52:31 +0000 (12:52 -0800)
Change-Id: I1b8c6c7e79cb8a05b4b715ddb3299d74edef0e14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net/ipv4/fib_semantics.c

index 7e454ba8e850e4f6d92975ff420a1dd21091f6bc..c60a396c44f4da9018431201695413b63c73e052 100644 (file)
@@ -1114,7 +1114,7 @@ void fib_select_default(struct fib_result *res)
                order++;
        }
 
-       if (order <= 0 || fi == NULL) {
+       if (order <= 0 || fi == NULL || fi->fib_dev == NULL) {
                tb->tb_default = -1;
                goto out;
        }