Skip to content

Commit

Permalink
multicast: fix receiver for IPv6 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianfridrich authored Jun 27, 2024
1 parent 115154e commit 243e870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/multicast/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ static int module_read_config(void)
err = conf_apply(conf_cur(), "multicast_listener",
module_read_config_handler, &prio);
if (err)
warning("Could not parse multicast config from file");
warning("Could not parse multicast config from file\n");

return err;
}
Expand Down
7 changes: 6 additions & 1 deletion modules/multicast/receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,12 @@ int mcreceiver_alloc(struct sa *addr, uint8_t prio)
goto out;
}

if (IN_MULTICAST(sa_in(&mcreceiver->addr))) {
if (IN_MULTICAST(sa_in(&mcreceiver->addr))
#ifdef HAVE_INET6
|| IN6_IS_ADDR_MULTICAST(&mcreceiver->addr.u.in6.sin6_addr)) {
#else
) {
#endif
err = udp_multicast_join((struct udp_sock *)
mcreceiver->rtp, &mcreceiver->addr);
if (err) {
Expand Down

0 comments on commit 243e870

Please sign in to comment.