mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-24 00:59:19 +02:00
Add check for SO_RTABLE support in openbsd, #95
This commit is contained in:
parent
312e228b1b
commit
627c70a7d9
|
@ -71,7 +71,11 @@ get_resolvconf_addr()
|
||||||
void
|
void
|
||||||
socket_setrtable(int fd, int rtable)
|
socket_setrtable(int fd, int rtable)
|
||||||
{
|
{
|
||||||
|
#ifdef SO_RTABLE
|
||||||
if (setsockopt (fd, IPPROTO_IP, SO_RTABLE, &rtable, sizeof(rtable)) == -1)
|
if (setsockopt (fd, IPPROTO_IP, SO_RTABLE, &rtable, sizeof(rtable)) == -1)
|
||||||
err(1, "Failed to set routing table %d", rtable);
|
err(1, "Failed to set routing table %d", rtable);
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "Routing domain support was not available at compile time.\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue