You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A listener is bound to SOCKADDR_ANY receiving packets from two or more NICs. pktinfo.ipi_ifindex is set to 0 for outcoming packets meaning the system can use its routing tables for selecting an interface.
Maybe in case PKTINFO is enable the desire is to always reply over the same interface, therefore, the ifindex has to be set accordingly.
SRT v1.5.2 and above (since the introduction of the SRT_ENABLE_PKTINFO).
Problem Description
Let's assume some PC has a single network interface (single IPv4 address) and is calling another PC (with two NICS) using active-backup redundancy.
Having the --enable-pktinfo option enabled does not guarantee the response would be over a correct interface. The response would go over whatever local address for the source IP with a 50/50 chance of being correct and the connection would fail.
The --enable-pkinfo compilation does not enforce that response packets should be sent out on the same interface from which packets were received. While the source IP to be used is grabbed using the pktinfo option, the received network interface is left to 0 meaning the system will use whatever it wants based on the current routing table.
ipi_ifindex is the unique index of the interface the
packet was received on. ipi_spec_dst is the local address
of the packet and ipi_addr is the destination address in
the packet header. If IP_PKTINFO is passed to sendmsg(2)
and ipi_spec_dst is not zero, then it is used as the local
source address for the routing table lookup and for
setting up IP source route options. When ipi_ifindex is
not zero, the primary local address of the interface
specified by the index overwrites ipi_spec_dst for the
routing table lookup.
Probably virtually in all cases we would want packets related to a SRT connection to use the same interface has what was received....
In any case the idea would either to
always force the output interface when --enable-pktinfo
provide an other option to let the application force the setting of the output interface to match the input interface or not.
Option a) seems simpler but maybe we need input from other users?
The text was updated successfully, but these errors were encountered:
Short Description
A listener is bound to SOCKADDR_ANY receiving packets from two or more NICs.
pktinfo.ipi_ifindex
is set to0
for outcoming packets meaning the system can use its routing tables for selecting an interface.Maybe in case PKTINFO is enable the desire is to always reply over the same interface, therefore, the
ifindex
has to be set accordingly.SRT v1.5.2 and above (since the introduction of the
SRT_ENABLE_PKTINFO
).Problem Description
Let's assume some PC has a single network interface (single IPv4 address) and is calling another PC (with two NICS) using active-backup redundancy.
Having the
--enable-pktinfo
option enabled does not guarantee the response would be over a correct interface. The response would go over whatever local address for the source IP with a 50/50 chance of being correct and the connection would fail.The
--enable-pkinfo
compilation does not enforce that response packets should be sent out on the same interface from which packets were received. While the source IP to be used is grabbed using the pktinfo option, the received network interface is left to 0 meaning the system will use whatever it wants based on the current routing table.Here the code in channel.h that uses IP_PKTINFO
Notice the
ipi_ifindex
being set to zeroThis paragraph from https://man7.org/linux/man-pages/man7/ip.7.html explains the option:
Probably virtually in all cases we would want packets related to a SRT connection to use the same interface has what was received....
In any case the idea would either to
--enable-pktinfo
Option a) seems simpler but maybe we need input from other users?
The text was updated successfully, but these errors were encountered: