diff options
Diffstat (limited to 'pimd/pim_sock.c')
| -rw-r--r-- | pimd/pim_sock.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index a2e166f796..a024e3ae01 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -79,6 +79,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, int loop) return PIM_SOCK_ERR_SOCKET; } +#ifdef SO_BINDTODEVICE if (protocol == IPPROTO_PIM) { int ret; @@ -104,7 +105,10 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, int loop) return PIM_SOCK_ERR_BIND; } } - +#else + /* XXX: use IP_PKTINFO / IP_RECVIF to emulate behaviour? Or change to + * only use 1 socket for all interfaces? */ +#endif /* Needed to obtain destination address from recvmsg() */ { @@ -209,7 +213,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, int loop) } int pim_socket_join(int fd, struct in_addr group, - struct in_addr ifaddr, int ifindex) + struct in_addr ifaddr, ifindex_t ifindex) { int ret; @@ -257,7 +261,7 @@ int pim_socket_join(int fd, struct in_addr group, return ret; } -int pim_socket_join_source(int fd, int ifindex, +int pim_socket_join_source(int fd, ifindex_t ifindex, struct in_addr group_addr, struct in_addr source_addr, const char *ifname) @@ -281,7 +285,7 @@ int pim_socket_join_source(int fd, int ifindex, int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len, struct sockaddr_in *from, socklen_t *fromlen, struct sockaddr_in *to, socklen_t *tolen, - int *ifindex) + ifindex_t *ifindex) { struct msghdr msgh; struct cmsghdr *cmsg; |
