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

Ondrej Filip feela at network.cz
Mon Aug 12 15:26:31 CEST 2019


On 12. 08. 19 15:13, Ondrej Zajicek wrote:
> 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?

I am dealing with the patch and just I wanted to raise the same
question. :-) You are quicker Santiago...
	Ondrej


> 
> 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
> 



More information about the Bird-users mailing list