diff options
author | SUZUKI, Shinsuke <suz@kame.net> | 2007-02-27 14:21:41 +0000 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2010-08-06 15:37:36 +0200 |
commit | fe2c74572f875332b461ba2a17a594a7ee4eb2d3 (patch) | |
tree | 84ca26e3f0168158823d7c741479e37ba069a862 /dhcp6relay.c | |
parent | fcdc0798bb2be5fa00427240afda6bdfd3d0a392 (diff) |
supported compilation on Solaris (contributed by James Carlson)
Diffstat (limited to 'dhcp6relay.c')
-rw-r--r-- | dhcp6relay.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dhcp6relay.c b/dhcp6relay.c index e05a47c..78d18df 100644 --- a/dhcp6relay.c +++ b/dhcp6relay.c @@ -360,12 +360,14 @@ relay6_init(int ifnum, char *iflist[]) strerror(errno)); goto failexit; } +#ifdef IPV6_V6ONLY if (setsockopt(csock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on)) < 0) { dprintf(LOG_ERR, FNAME, "setsockopt(csock, IPV6_V6ONLY): %s", strerror(errno)); goto failexit; } +#endif if (bind(csock, res->ai_addr, res->ai_addrlen) < 0) { dprintf(LOG_ERR, FNAME, "bind(csock): %s", strerror(errno)); goto failexit; @@ -470,12 +472,14 @@ relay6_init(int ifnum, char *iflist[]) goto failexit; } on = 1; +#ifdef IPV6_V6ONLY if (setsockopt(ssock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof (on)) < 0) { dprintf(LOG_ERR, FNAME, "setsockopt(ssock, IPV6_V6ONLY): %s", strerror(errno)); goto failexit; } +#endif if (bind(ssock, res->ai_addr, res->ai_addrlen) < 0) { dprintf(LOG_ERR, FNAME, "bind(ssock): %s", strerror(errno)); goto failexit; |