Signed-off-by: Benjamin Cama <benoar@dolka.fr>
/* NEXT_HOP */
a.flags = BGP_PATH_ATTR_FLAG_TRANS;
a.code = BGP_PATH_ATTR_CODE_NEXT_HOP;
/* 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));
a.data.s.len = sizeof(ip);
memcpy(a.data.s.value, &ip, sizeof(ip));
CONFIG("ipv6_prefix", ipv6_prefix, IPv6),
CONFIG("cli_bind_address", cli_bind_address, IPv4),
CONFIG("hostname", hostname, STRING),
CONFIG("ipv6_prefix", ipv6_prefix, IPv6),
CONFIG("cli_bind_address", cli_bind_address, IPv4),
CONFIG("hostname", hostname, STRING),
+ CONFIG("nexthop_address", nexthop_address, IPv4),
int hold;
struct in_addr update_source;
} neighbour[BGP_NUM_PEERS];
int hold;
struct in_addr update_source;
} neighbour[BGP_NUM_PEERS];
+ in_addr_t nexthop_address;