X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/b36141c0c739177e1ebb0e09024ca2fc736eb160..8c4f3bfe794e4ff92662d9be5903e5b203f5d41e:/bgp.c diff --git a/bgp.c b/bgp.c index 4b7f949..8e722de 100644 --- a/bgp.c +++ b/bgp.c @@ -195,7 +195,14 @@ int bgp_start(struct bgp_peer *peer, char *name, int as, int keepalive, /* NEXT_HOP */ a.flags = BGP_PATH_ATTR_FLAG_TRANS; a.code = BGP_PATH_ATTR_CODE_NEXT_HOP; - ip = my_address; /* we're it */ + if (config->nexthop_address) + { + ip = config->nexthop_address; + } + else + { + ip = my_address; /* we're it */ + } a.data.s.len = sizeof(ip); memcpy(a.data.s.value, &ip, sizeof(ip)); @@ -1011,7 +1018,7 @@ static int bgp_handle_input(struct bgp_peer *peer) if (notification->error_code == BGP_ERR_CEASE) { LOG(4, 0, 0, "BGP peer %s sent CEASE\n", peer->name); - bgp_restart(peer); + bgp_set_retry(peer); return 0; }