avtp: crf: Process also local CRF streams

Without this patch locally generated CRF streams will be ignored.
Therefore the same network interface could not be CRF talker and
CRF listener.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1074>
This commit is contained in:
Timo Wischer 2020-11-05 10:23:13 +01:00 committed by GStreamer Marge Bot
parent 27808444ea
commit 8e7ce64a6e

View file

@ -181,7 +181,7 @@ setup_socket (GstAvtpCrfBase * avtpcrfbase)
guint8 addr[ETH_ALEN];
int fd, res, ifindex;
fd = socket (AF_PACKET, SOCK_DGRAM, htons (ETH_P_TSN));
fd = socket (AF_PACKET, SOCK_DGRAM, htons (ETH_P_ALL));
if (fd < 0) {
GST_ERROR_OBJECT (avtpcrfbase, "Failed to open socket: %s",
g_strerror (errno));
@ -197,7 +197,7 @@ setup_socket (GstAvtpCrfBase * avtpcrfbase)
}
sk_addr.sll_family = AF_PACKET;
sk_addr.sll_protocol = htons (ETH_P_TSN);
sk_addr.sll_protocol = htons (ETH_P_ALL);
sk_addr.sll_ifindex = ifindex;
res = bind (fd, (struct sockaddr *) &sk_addr, sizeof (sk_addr));