0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 15:41:54 +00:00

Merge commit '354496ace87341428e6005fbc073fbe57b4e6c0e' into integrated

Conflicts:

	sysdep/bsd/sysio.h
	sysdep/unix/io.c
This commit is contained in:
Ondrej Zajicek 2013-07-31 18:33:55 +02:00
commit 5ea2afcdcf
2 changed files with 15 additions and 14 deletions

View File

@ -89,6 +89,7 @@ ospf_sk_open(struct ospf_iface *ifa)
sk->tbsize = rxbufsize(ifa);
sk->data = (void *) ifa;
sk->flags = SKF_LADDR_RX | (ifa->check_ttl ? SKF_TTL_RX : 0);
sk->ttl = ifa->cf->ttl_security ? 255 : -1;
if (sk_open(sk) != 0)
goto err;
@ -652,7 +653,8 @@ ospf_iface_reconfigure(struct ospf_iface *ifa, struct ospf_iface_patt *new)
/* Change of these options would require to reset the iface socket */
if ((new->real_bcast != ifa->cf->real_bcast) ||
(new->tx_tos != ifa->cf->tx_tos) ||
(new->tx_priority != ifa->cf->tx_priority))
(new->tx_priority != ifa->cf->tx_priority) ||
(new->ttl_security != ifa->cf->ttl_security))
return 0;
ifa->cf = new;

View File

@ -6,6 +6,18 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#ifdef __NetBSD__
#ifndef IP_RECVTTL
#define IP_RECVTTL 23
#endif
#ifndef IP_MINTTL
#define IP_MINTTL 24
#endif
#endif
#ifdef __DragonFly__
#define TCP_MD5SIG TCP_SIGNATURE_ENABLE
#endif
@ -211,8 +223,6 @@ sk_set_md5_auth_int(sock *s, struct sockaddr *sa, int sa_len, char *passwd)
}
#ifdef IP_MINTTL
static inline char *
sk_set_min_ttl4(sock *s, int ttl)
{
@ -222,17 +232,6 @@ sk_set_min_ttl4(sock *s, int ttl)
return NULL;
}
#else /* no IP_MINTTL */
static inline char *
sk_set_min_ttl4(sock *s, int ttl)
{
errno = ENOPROTOOPT;
return "IP_MINTTL";
}
#endif
static inline char *
sk_set_min_ttl6(sock *s, int ttl)
{