Add a per-peer flag if it supports IPv6 routes adv.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
This commit is contained in:
parent
d7e506baf4
commit
cd8502743f
2 changed files with 6 additions and 0 deletions
5
bgp.c
5
bgp.c
|
|
@ -762,6 +762,8 @@ static int bgp_connect(struct bgp_peer *peer)
|
||||||
|
|
||||||
LOG(4, 0, 0, "BGP peer %s: state Active\n", inet_ntoa(addr.sin_addr));
|
LOG(4, 0, 0, "BGP peer %s: state Active\n", inet_ntoa(addr.sin_addr));
|
||||||
|
|
||||||
|
peer->handle_ipv6_routes = 0;
|
||||||
|
|
||||||
return bgp_send_open(peer);
|
return bgp_send_open(peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -785,6 +787,8 @@ static int bgp_handle_connect(struct bgp_peer *peer)
|
||||||
|
|
||||||
LOG(4, 0, 0, "BGP peer %s: state Active\n", peer->name);
|
LOG(4, 0, 0, "BGP peer %s: state Active\n", peer->name);
|
||||||
|
|
||||||
|
peer->handle_ipv6_routes = 0;
|
||||||
|
|
||||||
return bgp_send_open(peer);
|
return bgp_send_open(peer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1051,6 +1055,7 @@ static int bgp_handle_input(struct bgp_peer *peer)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
peer->handle_ipv6_routes = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
1
bgp.h
1
bgp.h
|
|
@ -205,6 +205,7 @@ struct bgp_peer {
|
||||||
int path_attr_len; /* length of path attrs */
|
int path_attr_len; /* length of path attrs */
|
||||||
uint32_t events; /* events to poll */
|
uint32_t events; /* events to poll */
|
||||||
struct event_data edata; /* poll data */
|
struct event_data edata; /* poll data */
|
||||||
|
int handle_ipv6_routes; /* can handle IPv6 routes advertisements */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* bgp_peer.cli_flag */
|
/* bgp_peer.cli_flag */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue