--- linux-3.3.noarch/net/ipv4/route.c~ 2012-04-02 20:24:44.162789023 -0400 +++ linux-3.3.noarch/net/ipv4/route.c 2012-04-02 20:25:20.610784137 -0400 @@ -2794,6 +2794,14 @@ static struct rtable *ip_route_output_sl fl4->saddr = FIB_RES_PREFSRC(net, res); dev_out = FIB_RES_DEV(res); + + if (!dev_out) { + pr_crit("ipv4: FIB_RES_DEV() is NULL, nh_sel=%d\n", + res.nh_sel); + rth = ERR_PTR(-EINVAL); + goto out; + } + fl4->flowi4_oif = dev_out->ifindex;