Running a purely IPv6 scenario using -un option. unable to send data because of an "unsupported" soekts error. Eventually traced to SIPp creating an IPv4 socket and then attempting to sendto(IPv6 address), which of course it didn't like.
Seems the socket creating function checks is_ipv6 (which has not been set at this point) when local_is_ipv6 is probably correct. A local fix using local_is_ipv6 works fine but I'm unsure what else this might have affected.
Two questions:
1. Is there really a need for TWO global variables AND parameters passed to functions to control IPv6? Either a single global, or parameters/locals all round would see to be better.
2. Is there is a regression test suite for SIPp and if not, why no?
Patch for my local fix is...
diff -uNr sipp.svn.old/opentask.cpp sipp.svn.new/opentask.cpp
--- sipp.svn.old/opentask.cpp 2008-07-10 22:15:55.000000000 +0100
+++ sipp.svn.new/opentask.cpp 2011-05-26 18:15:29.000000000 +0100
@@ -116,7 +116,7 @@
// adding a new OUTGOING CALL
main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL);
- call * call_ptr = call::add_call(userid, is_ipv6, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr);
+ call * call_ptr = call::add_call(userid, local_ip_is_ipv6, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr);
if(!call_ptr) {
ERROR("Out of memory allocating call!");
}
SVN revision 615 should fix this (and it will be in SIPp 3.3). I'm looking at putting together some unit testing and regression testing over the next few months.