diff options
author | 2007-02-22 08:26:45 +0000 | |
---|---|---|
committer | 2007-02-22 08:26:45 +0000 | |
commit | d30aca78e1891f9a03b63f97b423f0fcca06909f (patch) | |
tree | 5b9aaa8005acc2726388e3be5ade58d0d66f80b3 | |
parent | We were getting no interrupts in .MP. There are 2 fixes; one in (diff) | |
download | wireguard-openbsd-d30aca78e1891f9a03b63f97b423f0fcca06909f.tar.xz wireguard-openbsd-d30aca78e1891f9a03b63f97b423f0fcca06909f.zip |
do not try to set IP_TTL on non-INET listening sockets, it's not going
to work on INET6...
non-fatal error, so in pratice this just avoids a misleading error msg
-rw-r--r-- | usr.sbin/bgpd/session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index ce3e9851350..c8899b7d370 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.268 2007/01/26 17:40:49 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.269 2007/02/22 08:26:45 henning Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -150,8 +150,8 @@ setup_listeners(u_int *la_cnt) } /* set ttl to 255 so that ttl-security works */ - if (setsockopt(la->fd, IPPROTO_IP, IP_TTL, &ttl, - sizeof(ttl)) == -1) { + if (la->sa.ss_family == AF_INET && setsockopt(la->fd, + IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) == -1) { log_warn("setup_listeners setsockopt TTL"); continue; } |