mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-10-18 18:08:45 +00:00
Merge commit '0343d066dab077d1391640c53198199b16bef993' into integrated
This commit is contained in:
commit
debc0e45fd
@ -123,6 +123,8 @@ else
|
|||||||
;;
|
;;
|
||||||
openbsd*) sysdesc=bsd
|
openbsd*) sysdesc=bsd
|
||||||
;;
|
;;
|
||||||
|
dragonfly*) sysdesc=bsd
|
||||||
|
;;
|
||||||
*) AC_MSG_ERROR([Cannot determine correct system configuration. Please use --with-sysconfig to set it manually.])
|
*) AC_MSG_ERROR([Cannot determine correct system configuration. Please use --with-sysconfig to set it manually.])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -113,7 +113,7 @@ neighbor *
|
|||||||
neigh_find2(struct proto *p, ip_addr *a, struct iface *ifa, unsigned flags)
|
neigh_find2(struct proto *p, ip_addr *a, struct iface *ifa, unsigned flags)
|
||||||
{
|
{
|
||||||
neighbor *n;
|
neighbor *n;
|
||||||
int class, scope = -1; ;
|
int class, scope = -1;
|
||||||
unsigned int h = neigh_hash(p, a);
|
unsigned int h = neigh_hash(p, a);
|
||||||
struct iface *i;
|
struct iface *i;
|
||||||
|
|
||||||
@ -239,7 +239,21 @@ neigh_down(neighbor *n)
|
|||||||
n->proto->neigh_notify(n);
|
n->proto->neigh_notify(n);
|
||||||
rem_node(&n->n);
|
rem_node(&n->n);
|
||||||
if (n->flags & NEF_STICKY)
|
if (n->flags & NEF_STICKY)
|
||||||
add_tail(&sticky_neigh_list, &n->n);
|
{
|
||||||
|
add_tail(&sticky_neigh_list, &n->n);
|
||||||
|
|
||||||
|
/* Respawn neighbor if there is another matching prefix */
|
||||||
|
struct iface *i;
|
||||||
|
int scope;
|
||||||
|
|
||||||
|
if (!n->iface)
|
||||||
|
WALK_LIST(i, iface_list)
|
||||||
|
if ((scope = if_connected(&n->addr, i)) >= 0)
|
||||||
|
{
|
||||||
|
neigh_up(n, i, scope);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sl_free(neigh_slab, n);
|
sl_free(neigh_slab, n);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __DragonFly__
|
||||||
|
#define TCP_MD5SIG TCP_SIGNATURE_ENABLE
|
||||||
|
#endif
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -113,13 +113,19 @@ kif_request_scan(void)
|
|||||||
tm_start(kif_scan_timer, 1);
|
tm_start(kif_scan_timer, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
|
||||||
prefer_scope(struct ifa *a, struct ifa *b)
|
|
||||||
{ return (a->scope > SCOPE_LINK) && (b->scope <= SCOPE_LINK); }
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
prefer_addr(struct ifa *a, struct ifa *b)
|
prefer_addr(struct ifa *a, struct ifa *b)
|
||||||
{ return ipa_compare(a->ip, b->ip) < 0; }
|
{
|
||||||
|
int sa = a->scope > SCOPE_LINK;
|
||||||
|
int sb = b->scope > SCOPE_LINK;
|
||||||
|
|
||||||
|
if (sa < sb)
|
||||||
|
return 0;
|
||||||
|
else if (sa > sb)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return ipa_compare(a->ip, b->ip) < 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline struct ifa *
|
static inline struct ifa *
|
||||||
find_preferred_ifa(struct iface *i, ip_addr prefix, ip_addr mask)
|
find_preferred_ifa(struct iface *i, ip_addr prefix, ip_addr mask)
|
||||||
@ -130,7 +136,7 @@ find_preferred_ifa(struct iface *i, ip_addr prefix, ip_addr mask)
|
|||||||
{
|
{
|
||||||
if (!(a->flags & IA_SECONDARY) &&
|
if (!(a->flags & IA_SECONDARY) &&
|
||||||
ipa_equal(ipa_and(a->ip, mask), prefix) &&
|
ipa_equal(ipa_and(a->ip, mask), prefix) &&
|
||||||
(!b || prefer_scope(a, b) || prefer_addr(a, b)))
|
(!b || prefer_addr(a, b)))
|
||||||
b = a;
|
b = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user