mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
IPv6 compiles with glibc 2.1.
This commit is contained in:
parent
f33c6c6602
commit
f380aa60fa
@ -1,14 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* BIRD Internet Routing Daemon -- Linux Multicasting and Network Includes
|
* BIRD Internet Routing Daemon -- Linux Multicasting and Network Includes
|
||||||
*
|
*
|
||||||
* (c) 1998--1999 Martin Mares <mj@ucw.cz>
|
* (c) 1998--2000 Martin Mares <mj@ucw.cz>
|
||||||
*
|
*
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
|
|
||||||
#include <linux/in6.h> /* FIXMEv6: glibc variant? */
|
#ifdef CONFIG_IPV6_GLIBC_20
|
||||||
|
#include <linux/in6.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
set_inaddr(struct in6_addr *ia, ip_addr a)
|
set_inaddr(struct in6_addr *ia, ip_addr a)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* BIRD Internet Routing Daemon -- Unix I/O
|
* BIRD Internet Routing Daemon -- Unix I/O
|
||||||
*
|
*
|
||||||
* (c) 1998--1999 Martin Mares <mj@ucw.cz>
|
* (c) 1998--2000 Martin Mares <mj@ucw.cz>
|
||||||
*
|
*
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
@ -585,7 +585,11 @@ sk_open(sock *s)
|
|||||||
{
|
{
|
||||||
struct ipv6_mreq mreq;
|
struct ipv6_mreq mreq;
|
||||||
set_inaddr(&mreq.ipv6mr_multiaddr, s->daddr);
|
set_inaddr(&mreq.ipv6mr_multiaddr, s->daddr);
|
||||||
|
#ifdef CONFIG_IPV6_GLIBC_20
|
||||||
mreq.ipv6mr_ifindex = s->iface->index;
|
mreq.ipv6mr_ifindex = s->iface->index;
|
||||||
|
#else
|
||||||
|
mreq.ipv6mr_interface = s->iface->index;
|
||||||
|
#endif
|
||||||
if (setsockopt(fd, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
|
if (setsockopt(fd, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
|
||||||
ERR("IPV6_ADD_MEMBERSHIP");
|
ERR("IPV6_ADD_MEMBERSHIP");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user