Commit 16f3fd6b authored by Jon Grimm's avatar Jon Grimm

[SCTP] Handle "no route" case for output handler (jgrimm)

parent e025484e
......@@ -429,6 +429,8 @@ int sctp_packet_transmit(sctp_packet_t *packet)
}
nskb->dst = dst_clone(transport->dst);
if (!nskb->dst)
goto no_route;
SCTP_DEBUG_PRINTK("***sctp_transmit_packet*** skb length %d\n",
nskb->len);
......@@ -436,6 +438,11 @@ int sctp_packet_transmit(sctp_packet_t *packet)
out:
packet->size = SCTP_IP_OVERHEAD;
return err;
no_route:
kfree_skb(nskb);
IP_INC_STATS_BH(IpOutNoRoutes);
err = -EHOSTUNREACH;
goto out;
}
/********************************************************************
......
......@@ -227,9 +227,12 @@ struct dst_entry *sctp_v4_get_dst(union sctp_addr *daddr,
union sctp_addr *saddr)
{
struct rtable *rt;
struct flowi fl = { .nl_u = { .ip4_u = { .daddr =
daddr->v4.sin_addr.s_addr,
} } };
struct flowi fl = {
.nl_u = {
.ip4_u = { .daddr =
daddr->v4.sin_addr.s_addr, }},
.proto = IPPROTO_SCTP,
};
if (saddr)
fl.fl4_src = saddr->v4.sin_addr.s_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment