On 2017/07/27 21:36, Paul de Weerd wrote: > I'm actively using (and enjoying) the fruit of Rafael's work on his > multicast proxy daemon (see [1] for details). Although I still > believe it would be beneficial to have code exercising the kernel's > multicast bits in base, that doesn't seem to be in the stars (at this > moment). So, with Rafael's permission, I'm presenting a port of his > work.
rc script needs ${TRUEPREFIX} in "daemon". There are several warnings in build: cc -O2 -pipe -I/usr/obj/ports/mcast-proxy-1.0/mcast-proxy-1.0 -Wall -Wextra -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wsign-compare -MD -MP -nostdinc -idirafter /usr/include -c mcast-proxy.c mcast-proxy.c:662:30: warning: taking address of packed member 'ip6_dst' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ^~~~~~~~~~~~ /usr/include/netinet6/in6.h:244:36: note: expanded from macro 'IN6_IS_ADDR_MULTICAST' #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) ^ mcast-proxy.c:667:27: warning: taking address of packed member 'ip6_src' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] id = intf_lookupbyaddr6(&ip6->ip6_src); ^~~~~~~~~~~~ mcast-proxy.c:670:29: warning: taking address of packed member 'ip6_src' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] __func__, addr6tostr(&ip6->ip6_src)); ^~~~~~~~~~~~ mcast-proxy.c:675:18: warning: taking address of packed member 'ip6_src' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] addr6tostr(&ip6->ip6_src), id->id_name, ^~~~~~~~~~~~ mcast-proxy.c:676:18: warning: taking address of packed member 'ip6_dst' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] addr6tostr(&ip6->ip6_dst)); ^~~~~~~~~~~~ mcast-proxy.c:678:30: warning: taking address of packed member 'ip6_src' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] mrt_insert6(MV_IGMPV3, id, &ip6->ip6_src, &ip6->ip6_dst); ^~~~~~~~~~~~ mcast-proxy.c:678:45: warning: taking address of packed member 'ip6_dst' of class or structure 'ip6_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] mrt_insert6(MV_IGMPV3, id, &ip6->ip6_src, &ip6->ip6_dst); ^~~~~~~~~~~~ mcast-proxy.c:695:34: warning: taking address of packed member 'mld_addr' of class or structure 'mld_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] addrtostr(src), addr6tostr(&mld->mld_addr)); ^~~~~~~~~~~~~ mcast-proxy.c:702:8: warning: taking address of packed member 'mld_addr' of class or structure 'mld_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] &mld->mld_addr); ^~~~~~~~~~~~~ mcast-proxy.c:705:47: warning: taking address of packed member 'mld_addr' of class or structure 'mld_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member] mrt_remove6(id, &sstosin6(src)->sin6_addr, &mld->mld_addr); ^~~~~~~~~~~~~ 10 warnings generated.