]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - net/ipv4/ip_output.c
ipv4: make ip_append_data() handle NULL routing table
[~shefty/rdma-dev.git] / net / ipv4 / ip_output.c
index 7d08210547291b74bc15d001e55eacdb8dd34281..7ffcd96fe591921bd139a1de925991b97f9a74f0 100644 (file)
@@ -813,6 +813,8 @@ int ip_append_data(struct sock *sk,
                        inet->cork.addr = ipc->addr;
                }
                rt = *rtp;
+               if (unlikely(!rt))
+                       return -EFAULT;
                /*
                 * We steal reference to this route, caller should not release it
                 */