* [PATCH] sctp: do not send packet to response OOTB packet if no route
@ 2010-02-04 9:09 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2010-02-04 9:09 UTC (permalink / raw)
To: linux-sctp
When we send a response packet to the OOTB packet, first we try to
get the route with both the OOTB packet's src and dest address, this
may return no route in some case, such as we had set the outbound
sctp packet should be discarded by IPsec. Then when we really to
transmit the response packet, we will only use the OOTB packet's
src address to lookup a route, this will alaways fail or get an
alert address which is not the OOTB packet's dest address. So we
should not try to send the response packet if there is no route at
the first setp.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/sm_statefuns.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 47bc20d..2847861 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -5835,6 +5835,12 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc
sctp_transport_route(transport, (union sctp_addr *)&chunk->dest,
sctp_sk(sctp_get_ctl_sock()));
+ /* No router for this OOTB packet */
+ if (!transport->dst) {
+ kfree(transport);
+ goto nomem;
+ }
+
packet = sctp_packet_init(&transport->packet, transport, sport, dport);
packet = sctp_packet_config(packet, vtag, 0);
--
1.6.5.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-04 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 9:09 [PATCH] sctp: do not send packet to response OOTB packet if no route Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).