amazon-kinesis-video-streams-webrtc-sdk-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard

[Bug]: Network filter does not apply to socket routing

Open apurohitrivian opened this issue 1 year ago • 1 comments

Please confirm you have already done the following

  • [X] I have searched the repository for related/existing bug reports
  • [X] I have all the details the issue requires

Please answer the following prompt

  • [X] This issue is replicable using the unmodified sample application

Describe the bug

  • The SDK provides a way to filter network interfaces so that ICE candidates are setup only on interfaces selected by the user.
  • However the socket created on the particular interface does not guarantee that packets are routed on the interface.

Did some more digging to find out that the socket creation is missing SO_BINDTODEVICE options. https://stackoverflow.com/questions/14478167/bind-socket-to-network-interface

Expected Behavior

Packets for an ice candidate are routed over the interface for which ICE candidate is created.

Current Behavior

Packets route over the default interface of the device.

Reproduction Steps

Create a webrtc session with network interface filter not being the default route interface for the device.

WebRTC C SDK version being used

1.7.3

If it was working in a previous version, which one?

No response

Compiler and Version used

gcc-9.4.0

Operating System and version

linux-ubuntu

Platform being used

amd64; arm64

apurohitrivian avatar Apr 16 '24 17:04 apurohitrivian

@apurohitrivian ,

Thank you for the details. Will look into this and revert back.

disa6302 avatar Apr 16 '24 17:04 disa6302