diff options
author | Maria Matejka <mq@ucw.cz> | 2022-11-07 10:24:56 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-11-07 10:24:56 +0100 |
commit | 54179a1ab38542e7087db37bfe3de9d32886c78e (patch) | |
tree | ca4238a2046bd5b6be90dab52b5b0cd3ab8663c0 /proto/bgp/bgp.c | |
parent | 96d380405701bb01d792ff1c867a607d7fefa001 (diff) | |
parent | 8f79e6b93e32a4eb7e4dda9bd4a9d04400b79d45 (diff) |
Merge commit '8f79e6b9' into thread-next
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index f8655d47..2f8da1af 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -2105,6 +2105,10 @@ bgp_postconfig(struct proto_config *CF) if (!cc->gw_mode) cc->gw_mode = cf->multihop ? GW_RECURSIVE : GW_DIRECT; + /* Different default for next_hop_prefer */ + if (!cc->next_hop_prefer) + cc->next_hop_prefer = (cc->gw_mode == GW_DIRECT) ? NHP_GLOBAL : NHP_LOCAL; + /* Defaults based on proto config */ if (cc->gr_able == 0xff) cc->gr_able = (cf->gr_mode == BGP_GR_ABLE); @@ -2235,6 +2239,7 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor return 0; if ((new->gw_mode != old->gw_mode) || + (new->next_hop_prefer != old->next_hop_prefer) || (new->aigp != old->aigp) || (new->cost != old->cost)) { |