diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-02-22 08:26:46 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-02-22 08:26:46 +0000 |
commit | bc038120c73fb339c795df6125657b2371161de4 (patch) | |
tree | f006032c3e5f4005d752c1b25ce22a797291f080 | |
parent | 8d564d16d141f6441984e9c7c561e482e5f0268b (diff) |
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; } |