mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Fixes bugs in IPv6 code caused by recent commits.
This commit is contained in:
parent
baa9ef18c6
commit
1389f3699f
@ -700,7 +700,7 @@ bgp_do_rx_update(struct bgp_conn *conn,
|
|||||||
/* Create fake NEXT_HOP attribute */
|
/* Create fake NEXT_HOP attribute */
|
||||||
if (len < 1 || (*x != 16 && *x != 32) || len < *x + 2)
|
if (len < 1 || (*x != 16 && *x != 32) || len < *x + 2)
|
||||||
goto bad;
|
goto bad;
|
||||||
bgp_attach_attr_ip(&a0->eattrs, bgp_linpool, BA_NEXT_HOP, x[1]);
|
memcpy(bgp_attach_attr_wa(&a0->eattrs, bgp_linpool, BA_NEXT_HOP, 16), x+1, 16);
|
||||||
len -= *x + 2;
|
len -= *x + 2;
|
||||||
x += *x + 1;
|
x += *x + 1;
|
||||||
|
|
||||||
|
@ -616,7 +616,7 @@ sk_set_ttl_int(sock *s)
|
|||||||
int one = 1;
|
int one = 1;
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
if (s->type != SK_UDP_MC && s->type != SK_IP_MC &&
|
if (s->type != SK_UDP_MC && s->type != SK_IP_MC &&
|
||||||
setsockopt(fd, SOL_IPV6, IPV6_UNICAST_HOPS, &s->ttl, sizeof(s->ttl)) < 0)
|
setsockopt(s->fd, SOL_IPV6, IPV6_UNICAST_HOPS, &s->ttl, sizeof(s->ttl)) < 0)
|
||||||
return "IPV6_UNICAST_HOPS";
|
return "IPV6_UNICAST_HOPS";
|
||||||
#else
|
#else
|
||||||
if (setsockopt(s->fd, SOL_IP, IP_TTL, &s->ttl, sizeof(s->ttl)) < 0)
|
if (setsockopt(s->fd, SOL_IP, IP_TTL, &s->ttl, sizeof(s->ttl)) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user