From: Ondrej Zajicek Date: Wed, 31 Jul 2013 16:33:55 +0000 (+0200) Subject: Merge commit '354496ace87341428e6005fbc073fbe57b4e6c0e' into integrated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ea2afcdcf423bbe7c836992ca62b8a07a55ccc5;p=thirdparty%2Fbird.git Merge commit '354496ace87341428e6005fbc073fbe57b4e6c0e' into integrated Conflicts: sysdep/bsd/sysio.h sysdep/unix/io.c --- 5ea2afcdcf423bbe7c836992ca62b8a07a55ccc5 diff --cc sysdep/bsd/sysio.h index e33bc9c66,cf049a0b1..6de329198 --- a/sysdep/bsd/sysio.h +++ b/sysdep/bsd/sysio.h @@@ -211,35 -270,35 +223,22 @@@ sk_set_md5_auth_int(sock *s, struct soc } - #ifdef IP_MINTTL -#ifndef IPV6 -- -static int +static inline char * sk_set_min_ttl4(sock *s, int ttl) { if (setsockopt(s->fd, IPPROTO_IP, IP_MINTTL, &ttl, sizeof(ttl)) < 0) - { - if (errno == ENOPROTOOPT) - log(L_ERR "Kernel does not support IPv4 TTL security"); - else - log(L_ERR "sk_set_min_ttl4: setsockopt: %m"); - - return -1; - } + return "IP_MINTTL"; - return 0; + return NULL; } - #else /* no IP_MINTTL */ - - static inline char * - sk_set_min_ttl4(sock *s, int ttl) - { - errno = ENOPROTOOPT; - return "IP_MINTTL"; - } - - #endif -#else /* IPv6 */ -- -static int +static inline char * sk_set_min_ttl6(sock *s, int ttl) { - log(L_ERR "IPv6 TTL security not supported"); - return -1; + errno = ENOPROTOOPT; + return "IP_MINTTL"; } -#endif - int sk_priority_control = -1;