[PATCH 3/3] BSD: add support for ttl security and IPv6

Ondrej Zajicek santiago at crfreenet.org
Mon Aug 12 15:13:48 CEST 2019


On Mon, Aug 12, 2019 at 01:57:40PM +0200, Vincent Bernat wrote:
> FreeBSD use the same value as IPv4, set with IP_MINTTL, for IPv6. See:
> <http://fxr.watson.org/fxr/source/netinet/tcp_input.c?v=FREEBSD-12-0#L937>

This seems strange to me, i would expect thate the setsockopt() would
be rejected just because it is IPPROTO_IP and not IPPROTO_IPV6.

Was it tested, does it really work?

Also, it seems that OpenBSD has IPV6_MINHOPCOUNT like Linux.


> ---
>  sysdep/bsd/sysio.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sysdep/bsd/sysio.h b/sysdep/bsd/sysio.h
> index 545276a37c3a..f02b80945ba2 100644
> --- a/sysdep/bsd/sysio.h
> +++ b/sysdep/bsd/sysio.h
> @@ -245,9 +245,9 @@ sk_set_min_ttl4(sock *s, int ttl)
>  }
>  
>  static inline int
> -sk_set_min_ttl6(sock *s, int ttl UNUSED)
> +sk_set_min_ttl6(sock *s, int ttl)
>  {
> -  ERR_MSG("Kernel does not support IPv6 TTL security");
> +  return sk_set_min_ttl4(s, ttl);
>  }
>  
>  static inline int
> -- 
> 2.23.0.rc1

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


More information about the Bird-users mailing list