diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -163,12 +163,12 @@ socket_rdomain(int domain, int type, int protocol, int rdomain) | |||
163 | if (rdomain == -1) | 163 | if (rdomain == -1) |
164 | return (sock); | 164 | return (sock); |
165 | 165 | ||
166 | #ifdef USE_ROUTINGDOMAIN | ||
167 | switch (domain) { | 166 | switch (domain) { |
168 | case AF_INET6: | 167 | case AF_INET6: |
169 | ipproto = IPPROTO_IPV6; | 168 | ipproto = IPPROTO_IPV6; |
170 | /* FALLTHROUGH */ | 169 | /* FALLTHROUGH */ |
171 | case AF_INET: | 170 | case AF_INET: |
171 | #ifdef USE_ROUTINGDOMAIN | ||
172 | debug2("socket %d af %d setting rdomain %d", | 172 | debug2("socket %d af %d setting rdomain %d", |
173 | sock, domain, rdomain); | 173 | sock, domain, rdomain); |
174 | if (setsockopt(sock, ipproto, SO_RDOMAIN, &rdomain, | 174 | if (setsockopt(sock, ipproto, SO_RDOMAIN, &rdomain, |
@@ -178,6 +178,7 @@ socket_rdomain(int domain, int type, int protocol, int rdomain) | |||
178 | close(sock); | 178 | close(sock); |
179 | return (-1); | 179 | return (-1); |
180 | } | 180 | } |
181 | #endif | ||
181 | break; | 182 | break; |
182 | default: | 183 | default: |
183 | debug("socket %d af %d does not support rdomain %d", | 184 | debug("socket %d af %d does not support rdomain %d", |
@@ -187,9 +188,6 @@ socket_rdomain(int domain, int type, int protocol, int rdomain) | |||
187 | } | 188 | } |
188 | 189 | ||
189 | return (sock); | 190 | return (sock); |
190 | #else | ||
191 | return (-1); | ||
192 | #endif | ||
193 | } | 191 | } |
194 | 192 | ||
195 | /* Characters considered whitespace in strsep calls. */ | 193 | /* Characters considered whitespace in strsep calls. */ |