[sr-dev] [kamailio/kamailio] t_relay() sending packets from the wrong TCP socket (#1532)

Vadim Lebedev vadim at mbdsys.com
Wed Jun 20 14:58:45 CEST 2018


First of all what this article:

   - https://superuser.com/questions/1118735/how-are-
   source-ports-determined-and-how-can-i-force-it-to-use-a-specific-port
   <https://superuser.com/questions/1118735/how-are-source-ports-determined-and-how-can-i-force-it-to-use-a-specific-port>

Fails to mention very simple way to force local port number on outgoing tcp
connections:   the bind(...)  call
Second why don't kamalio do not re-use an existing connection to a given
destination is  also interesting question

2018-06-20 14:01 GMT+02:00 Daniel-Constantin Mierla <
notifications at github.com>:

> If you refer that the local port of a tcp connection initiated by kamailio
> is sort of random number, not the port on which kamailio listens, then this
> is how the TCP stack works. Homer likely takes the internal socket used to
> receive the packet or the one specific for the interface to send out.
>
> In tcp, it is not possible (or better said, rather impossible) to force
> local socket for a tcp connection, you can search more on google about, for
> example a discussion at:
>
>    - https://superuser.com/questions/1118735/how-are-
>    source-ports-determined-and-how-can-i-force-it-to-use-a-specific-port
>    <https://superuser.com/questions/1118735/how-are-source-ports-determined-and-how-can-i-force-it-to-use-a-specific-port>
>
> I am going to close this issue -- if you want to discuss more on this
> topic, the right place is sr-users at lists.kamailio.org mailing list.
>
> If I misunderstood what you reported and you still think it is an issue of
> kamailio, reopen and try to describe from another angle, like what it is
> happening for a specific case and what you expected to happen.
>
>> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/kamailio/kamailio/issues/1532#issuecomment-398724607>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AF36ZTnPeEFpbsX3WC7CisFNUaLYTXLCks5t-jmzgaJpZM4UAV3q>
> .
>
> _______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180620/4f25f74f/attachment-0003.html>


More information about the sr-dev mailing list