diff --git a/doc/change.log b/doc/change.log index f7fda44cb753280433a633b21921d08dcb4302e7..54919549bbdbddca21e4d0a4cd51a6f11ab80315 100644 --- a/doc/change.log +++ b/doc/change.log @@ -7,3 +7,7 @@ === R12A IPv6 support added + +=== R12A + +The SO_REUSEADDR added back. It was removed accidentally during update/refactor diff --git a/src/SCTPasp_PT.cc b/src/SCTPasp_PT.cc index 4a8f9cfe562252ee9dc2ebb81dc8eeffbd06a4a3..e1b2abc6bb44aa8721de617cabddd21d9991f872 100644 --- a/src/SCTPasp_PT.cc +++ b/src/SCTPasp_PT.cc @@ -18,8 +18,6 @@ // // File: SCTPasp_PT.cc // Description: SCTPasp test port source -// Rev: -// Prodnr: CNL 113 469 // @@ -1554,10 +1552,18 @@ int SCTPasp__PT_PROVIDER::fill_addr_struct(const char* name, int port, struct so int SCTPasp__PT_PROVIDER::create_socket(int addr_family) { int local_fd; + int enable = 1; log("Creating SCTP socket."); if ((local_fd = socket(addr_family, SOCK_STREAM, IPPROTO_SCTP)) == -1) error("Socket error: cannot create socket! %d %s %d %d",errno, strerror(errno),addr_family,AF_INET); + log("Setting SO_REUSEADDR options."); + if (setsockopt(local_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) < 0) + { + TTCN_warning("Setsockopt SO_REUSEADDR error! %d %s",errno, strerror(errno)); + errno = 0; + } + log("Setting SCTP socket options (initmsg)."); if (setsockopt(local_fd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, sizeof(struct sctp_initmsg)) < 0) diff --git a/src/SCTPasp_PT.hh b/src/SCTPasp_PT.hh index 114b0a7526a8abd85c91433358787754ced242c7..5b889299beacc411864bae573c03400879f20bbf 100644 --- a/src/SCTPasp_PT.hh +++ b/src/SCTPasp_PT.hh @@ -18,7 +18,6 @@ // // File: SCTPasp_PT.hh // Description: SCTPasp test port header -// Prodnr: CNL 113 469 // diff --git a/src/SCTPasp_PortType.ttcn b/src/SCTPasp_PortType.ttcn index 3338e068e5f0dbad12ff9c4ab861bb661687c49d..8e3493f9fb50213ed6096990d2f2a30e8b7cf846 100644 --- a/src/SCTPasp_PortType.ttcn +++ b/src/SCTPasp_PortType.ttcn @@ -18,7 +18,6 @@ // // File: SCTPasp_PortType.ttcn // Description: SCTPasp testport definition file -// Prodnr: CNL 113 469 // module SCTPasp_PortType diff --git a/src/SCTPasp_Types.ttcn b/src/SCTPasp_Types.ttcn index 005edf66ede4735a48a305d71078a77f764ddcf8..d6041580763e81c209c8ff5bc8bd33c1cdaf7e06 100644 --- a/src/SCTPasp_Types.ttcn +++ b/src/SCTPasp_Types.ttcn @@ -18,7 +18,6 @@ // // File: SCTPasp_Types.ttcn // Description: SCTP ASP definition file -// Prodnr: CNL 113 469 //