Module: sip-router
Branch: master
Commit: 8459110abc3e0241e7b8a028e0252c97c8a5d9b5
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8459110…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Oct 5 16:15:30 2009 +0200
sctp: linux kernel obsolete api bug workaround
set SPP_PMTUD_ENABLE when changing pathmaxrxt on linux. This was
required on older versions of the api draft (<=14, most likely a
draft bug) and is still required on linux.
Reported-by: Libor Chocholaty libor at iptel org
---
sctp_server.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sctp_server.c b/sctp_server.c
index 909d735..9fa2b56 100644
--- a/sctp_server.c
+++ b/sctp_server.c
@@ -610,6 +610,13 @@ static int sctp_init_sock_opt_common(int s, int af)
pp.spp_flags=SPP_HB_DISABLE;
pp.spp_hbinterval=0;
}
+#ifdef __OS_linux
+ if (pp.spp_pathmaxrxt){
+ /* hack to work on linux, pathmaxrxt is set only if
+ SPP_PMTUD_ENABLE */
+ pp.spp_flags|=SPP_PMTUD_ENABLE;
+ }
+#endif /*__OS_linux */
/* if at least one is non-null => we have to set it */
if (sctp_setsockopt(s, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, (void*)&pp,
sizeof(pp), "setsockopt: SCTP_PEER_ADDR_PARAMS")!=0){