* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) [not found] ` <4C46FD58.9030107@hp.com> @ 2012-05-04 10:07 ` Nicolas Dichtel 2012-05-04 14:48 ` David Miller 0 siblings, 1 reply; 5+ messages in thread From: Nicolas Dichtel @ 2012-05-04 10:07 UTC (permalink / raw) To: Vlad Yasevich Cc: Babu Srinivasan, lksctp-developers, lksctp, netdev, Kreuzer, Michael (NSN - DE/Ulm) [-- Attachment #1: Type: text/plain, Size: 497 bytes --] Finally, this patch was never integrated into the mainline. Should I rebase it on the head? I've attach the last approved patch. Here is the original thread: http://sourceforge.net/mailarchive/message.php?msg_id=25786006 Regards, Nicolas Le 21/07/2010 15:59, Vlad Yasevich a écrit : > On 07/21/2010 04:06 AM, Nicolas Dichtel wrote: >> Finally, we can use dst_check(). Please, find a new patch enclosed. >> >> >> Regards, >> Nicolas >> > > I like this one a better. Taken. > > Thanks > -vlad [-- Attachment #2: 0001-sctp-check-cached-dst-before-using-it.patch --] [-- Type: text/x-patch, Size: 2498 bytes --] >From a54926eded11de99a0cfcda45d852d2f6e919b77 Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Wed, 21 Jul 2010 09:59:49 +0200 Subject: [PATCH] sctp: check cached dst before using it dst_check() will take care of SA (and obsolete field), hence IPsec rekeying scenario is taken into account. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> --- include/net/sctp/sctp.h | 13 +++++++++++++ net/sctp/output.c | 4 +--- net/sctp/transport.c | 17 ----------------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 65946bc..ab54df3 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -691,4 +691,17 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr) addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff); } +/* The cookie is always 0 since this is how it's used in the + * pmtu code. + */ +static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) +{ + if (t->dst && !dst_check(t->dst, 0)) { + dst_release(t->dst); + t->dst = NULL; + } + + return t->dst; +} + #endif /* __net_sctp_h__ */ diff --git a/net/sctp/output.c b/net/sctp/output.c index a646681..93daf59 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -376,9 +376,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) */ skb_set_owner_w(nskb, sk); - /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ - if (!dst || (dst->obsolete > 1)) { - dst_release(dst); + if (!sctp_transport_dst_check(tp)) { sctp_transport_route(tp, NULL, sctp_sk(sk)); if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { sctp_assoc_sync_pmtu(asoc); diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 132046c..bce3f06 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -222,23 +222,6 @@ void sctp_transport_pmtu(struct sctp_transport *transport) transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; } -/* this is a complete rip-off from __sk_dst_check - * the cookie is always 0 since this is how it's used in the - * pmtu code - */ -static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) -{ - struct dst_entry *dst = t->dst; - - if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { - dst_release(t->dst); - t->dst = NULL; - return NULL; - } - - return dst; -} - void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) { struct dst_entry *dst; -- 1.5.4.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) 2012-05-04 10:07 ` [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) Nicolas Dichtel @ 2012-05-04 14:48 ` David Miller 2012-05-04 15:24 ` Nicolas Dichtel 0 siblings, 1 reply; 5+ messages in thread From: David Miller @ 2012-05-04 14:48 UTC (permalink / raw) To: nicolas.dichtel Cc: vladislav.yasevich, babu.srinivasan, lksctp-developers, linux-sctp, netdev, michael.kreuzer From: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Fri, 04 May 2012 12:07:38 +0200 > Finally, this patch was never integrated into the mainline. Should I > rebase it on the head? > > I've attach the last approved patch. > > Here is the original thread: > http://sourceforge.net/mailarchive/message.php?msg_id=25786006 Vlad no longer works for HP so your email likely will bounce, and he will not see it. His new email address is vyasevich@gmail.com, as per the MAINTAINERS file. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) 2012-05-04 14:48 ` David Miller @ 2012-05-04 15:24 ` Nicolas Dichtel [not found] ` <CAGCdqXFjyWst22DJgxNfakz3-JwRq0Z+WZVj-XT=qRQFY5w3rw@mail.gmail.com> 0 siblings, 1 reply; 5+ messages in thread From: Nicolas Dichtel @ 2012-05-04 15:24 UTC (permalink / raw) To: David Miller, vyasevich Cc: babu.srinivasan, lksctp-developers, linux-sctp, netdev, michael.kreuzer [-- Attachment #1: Type: text/plain, Size: 653 bytes --] Le 04/05/2012 16:48, David Miller a écrit : > From: Nicolas Dichtel<nicolas.dichtel@6wind.com> > Date: Fri, 04 May 2012 12:07:38 +0200 > >> Finally, this patch was never integrated into the mainline. Should I >> rebase it on the head? >> >> I've attach the last approved patch. >> >> Here is the original thread: >> http://sourceforge.net/mailarchive/message.php?msg_id=25786006 > > Vlad no longer works for HP so your email likely will bounce, and > he will not see it. Right. > > His new email address is vyasevich@gmail.com, as per the MAINTAINERS > file. I put the right email address now. I attach the patch again, for Vlad. Thank you, Nicolas [-- Attachment #2: 0001-sctp-check-cached-dst-before-using-it.patch --] [-- Type: text/x-patch, Size: 2498 bytes --] >From a54926eded11de99a0cfcda45d852d2f6e919b77 Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Wed, 21 Jul 2010 09:59:49 +0200 Subject: [PATCH] sctp: check cached dst before using it dst_check() will take care of SA (and obsolete field), hence IPsec rekeying scenario is taken into account. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> --- include/net/sctp/sctp.h | 13 +++++++++++++ net/sctp/output.c | 4 +--- net/sctp/transport.c | 17 ----------------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 65946bc..ab54df3 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -691,4 +691,17 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr) addr->v6.sin6_addr.s6_addr32[2] = htonl(0x0000ffff); } +/* The cookie is always 0 since this is how it's used in the + * pmtu code. + */ +static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) +{ + if (t->dst && !dst_check(t->dst, 0)) { + dst_release(t->dst); + t->dst = NULL; + } + + return t->dst; +} + #endif /* __net_sctp_h__ */ diff --git a/net/sctp/output.c b/net/sctp/output.c index a646681..93daf59 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -376,9 +376,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) */ skb_set_owner_w(nskb, sk); - /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ - if (!dst || (dst->obsolete > 1)) { - dst_release(dst); + if (!sctp_transport_dst_check(tp)) { sctp_transport_route(tp, NULL, sctp_sk(sk)); if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { sctp_assoc_sync_pmtu(asoc); diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 132046c..bce3f06 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -222,23 +222,6 @@ void sctp_transport_pmtu(struct sctp_transport *transport) transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; } -/* this is a complete rip-off from __sk_dst_check - * the cookie is always 0 since this is how it's used in the - * pmtu code - */ -static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) -{ - struct dst_entry *dst = t->dst; - - if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { - dst_release(t->dst); - t->dst = NULL; - return NULL; - } - - return dst; -} - void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) { struct dst_entry *dst; -- 1.5.4.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <CAGCdqXFjyWst22DJgxNfakz3-JwRq0Z+WZVj-XT=qRQFY5w3rw@mail.gmail.com>]
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) [not found] ` <CAGCdqXFjyWst22DJgxNfakz3-JwRq0Z+WZVj-XT=qRQFY5w3rw@mail.gmail.com> @ 2012-05-09 12:04 ` Nicolas Dichtel 2012-05-11 3:15 ` David Miller 1 sibling, 0 replies; 5+ messages in thread From: Nicolas Dichtel @ 2012-05-09 12:04 UTC (permalink / raw) To: Vladislav Yasevich Cc: David Miller, babu.srinivasan, lksctp-developers, linux-sctp, netdev, michael.kreuzer Le 04/05/2012 20:15, Vladislav Yasevich a écrit : > On Fri, May 4, 2012 at 11:24 AM, Nicolas Dichtel > <nicolas.dichtel@6wind.com>wrote: > >> Le 04/05/2012 16:48, David Miller a écrit : >> >> From: Nicolas Dichtel<nicolas.dichtel@6wind.**com<nicolas.dichtel@6wind.com> >>>> >>> Date: Fri, 04 May 2012 12:07:38 +0200 >>> >>> Finally, this patch was never integrated into the mainline. Should I >>>> rebase it on the head? It applies cleanly on linus tree, so I will not rebase it. Regards, Nicolas >>>> >>>> I've attach the last approved patch. >>>> >>>> Here is the original thread: >>>> http://sourceforge.net/**mailarchive/message.php?msg_**id=25786006<http://sourceforge.net/mailarchive/message.php?msg_id=25786006> >>>> >>> >>> Vlad no longer works for HP so your email likely will bounce, and >>> he will not see it. >>> >> Right. >> >> >> >>> His new email address is vyasevich@gmail.com, as per the MAINTAINERS >>> file. >>> >> >> I put the right email address now. I attach the patch again, for Vlad. >> >> >> Thank you, >> Nicolas >> > > > Right. This looks fine. > > Acked-by: Vlad Yaseivch<vyasevich@gmail.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) [not found] ` <CAGCdqXFjyWst22DJgxNfakz3-JwRq0Z+WZVj-XT=qRQFY5w3rw@mail.gmail.com> 2012-05-09 12:04 ` Nicolas Dichtel @ 2012-05-11 3:15 ` David Miller 1 sibling, 0 replies; 5+ messages in thread From: David Miller @ 2012-05-11 3:15 UTC (permalink / raw) To: vyasevich Cc: nicolas.dichtel, babu.srinivasan, lksctp-developers, linux-sctp, netdev, michael.kreuzer From: Vladislav Yasevich <vyasevich@gmail.com> Date: Fri, 4 May 2012 14:15:05 -0400 > Acked-by: Vlad Yaseivch <vyasevich@gmail.com> Applied. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-11 3:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AANLkTikYfUJRqlE5KR5v13-aFEzTfNyui14IcELmFNLX@mail.gmail.com>
[not found] ` <4C408564.7040808@hp.com>
[not found] ` <4C4456A5.3000403@6wind.com>
[not found] ` <4C445A40.5010508@hp.com>
[not found] ` <4C446CF5.5020007@6wind.com>
[not found] ` <4C4470C5.7060608@hp.com>
[not found] ` <4C456DC0.8030308@6wind.com>
[not found] ` <4C46AA7B.3090601@6wind.com>
[not found] ` <4C46FD58.9030107@hp.com>
2012-05-04 10:07 ` [Lksctp-developers] Bug: sctp packets are dropped after IPSEC rekeying (route cache issue) Nicolas Dichtel
2012-05-04 14:48 ` David Miller
2012-05-04 15:24 ` Nicolas Dichtel
[not found] ` <CAGCdqXFjyWst22DJgxNfakz3-JwRq0Z+WZVj-XT=qRQFY5w3rw@mail.gmail.com>
2012-05-09 12:04 ` Nicolas Dichtel
2012-05-11 3:15 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox