Summary: | benchmarks/sipp Not working on FreeBSD 11.1 and 10.3 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | OlivierW <olivierw1+bugzilla-freebsd> |
Component: | Individual Port(s) | Assignee: | Babak Farrokhi <farrokhi> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | ganbold, szabig, w.schwarzenfeld |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(farrokhi) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
OlivierW
2017-10-03 22:17:29 UTC
Did you solve it? Please let me know. I'm also having same issue as you. Maybe this is it? https://github.com/SIPp/sipp/blob/master/CHANGES.md There is a new version 3.6.0. SIPp v3.3 (TLS, built Jul 22 2013, 08:43:48) works for me, but this package is old and built for FreeBSD 9.x. I took it from http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/9.2-RELEASE/packages/benchmarks/ and it requires older libssl and libcrypto. sipp-3.4.1 works. SIPp v3.5.0 is not working. (In reply to w.schwarzenfeld from comment #2) sipp-3.6-dev version is not working. It seems like get_inet_address() function is not working anymore in case of FreeBSD. Following old function from sipp-3.4.1 in sipp-3.5.0 sort of works for me: --- src/socket.cpp-orig 2018-01-12 14:36:14.758860000 +0800 +++ src/socket.cpp 2018-01-12 15:31:55.925119000 +0800 @@ -337,11 +337,27 @@ static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { - if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(*addr), - dst, len, NULL, 0, NI_NUMERICHOST) != 0) { - snprintf(dst, len, "addr not supported"); +// if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(*addr), +// dst, len, NULL, 0, NI_NUMERICHOST) != 0) { +// snprintf(dst, len, "addr not supported"); +// } +// return dst; + static char * ip_addr = NULL; + + if (!ip_addr) { + ip_addr = (char *)malloc(1024*sizeof(char)); + } + if (getnameinfo(_RCAST(struct sockaddr *, addr), + SOCK_ADDR_SIZE(addr), + ip_addr, + 1024, + NULL, + 0, + NI_NUMERICHOST) != 0) { + strcpy(ip_addr, "addr not supported"); } - return dst; + + return ip_addr; } I had to run following command to make it work in this case: sipp -sn uac -m 1 -d 30000 -r 10 -l 200 -s 1002 -mp 6000 SERVER_IP -l 10 -trace_err -i MY_IP -mi MY_IP -rsa SERVER_IP:5060 -auth_uri SERVER_IP:5060 (In reply to Ganbold Tsagaankhuu from comment #1) Hello Ganbold, Sadly, I didn't solve the issue, and as I needed sipp in emergency, I used it on Debian :-( I haven't found time to do more tests or try your patch. Best Regards, Olivier This worked for me: *** sipp-3.5.1/src/socket.cpp Thu Mar 17 09:05:49 2016 --- sipp-3.5.1/src/socket.cpp.new Wed Feb 14 15:05:39 2018 *************** const char *sip_tls_error_string(SSL *ss *** 338,344 **** static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { ! if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(*addr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } --- 338,344 ---- static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { ! if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(struct sockaddr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } (In reply to szabig from comment #9) ... on a second thought, this is probably the intended solution (and it works): *** sipp-3.5.1/src/socket.cpp Thu Mar 17 09:05:49 2016 --- sipp-3.5.1/src/socket.cpp.new Thu Feb 15 12:57:22 2018 *************** *** 338,344 **** static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { ! if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(*addr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } --- 338,344 ---- static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { ! if (getnameinfo(_RCAST(struct sockaddr*, addr), SOCK_ADDR_SIZE(addr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } A commit references this bug: Author: farrokhi Date: Sun Jul 8 11:15:52 UTC 2018 New revision: 474174 URL: https://svnweb.freebsd.org/changeset/ports/474174 Log: benchmarks/sipp: PR: 222764 Submitted by: szabig <szabig@kgb.hu> Reported by: OlivierW <olivierw1+bugzilla-freebsd@hotmail.com> Changes: head/benchmarks/sipp/Makefile head/benchmarks/sipp/files/ head/benchmarks/sipp/files/patch-src_socket.cpp |