Skip to content

Commit 4104beb

Browse files
committed
Use socket adaptation (~ppid) option as default adaptation value
- Current SCTP linux release A1305EABD8F6C3D37020C43 break the behaviour of previous release AE81E0A508A0D11D1341E64 In AE81E0A508A0D11D1341E64 when setting the socket option SCTP_ADAPTATION_LAYER, it was then use as global default value for next assosiations. It is not the case anymore in A1305EABD8F6C3D37020C43. That commit shield us against that breaking change.
1 parent ab1e97d commit 4104beb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sctp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ def getladdrs(self, assoc_id = 0): # -> tuple of sockaddrs as strings
11121112

11131113
return _sctp.getladdrs(self._sk.fileno(), assoc_id)
11141114

1115-
def sctp_send(self, msg, to=("",0), ppid=0, flags=0, stream=None, timetolive=None, context=0,
1115+
def sctp_send(self, msg, to=("",0), ppid=None, flags=0, stream=None, timetolive=None, context=0,
11161116
record_file_prefix="RECORD_sctp_traffic", datalogging = False):
11171117
"""
11181118
Sends a SCTP message. While send()/sendto() can also be used, this method also
@@ -1157,6 +1157,9 @@ def sctp_send(self, msg, to=("",0), ppid=0, flags=0, stream=None, timetolive=Non
11571157
The application must configure this buffer accordingly.
11581158
"""
11591159

1160+
if ppid is None:
1161+
ppid = self.adaptation
1162+
11601163
if timetolive is None:
11611164
timetolive = self._ttl
11621165

0 commit comments

Comments
 (0)