X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fwireguard%2Fwireguard_peer.c;h=3985f4347b45a779a59b693001aa7855c7f9cc1e;hb=58db34c2ca491cb949ab046cccbd73be14b90647;hp=0dcc4e20e41e3007b613153e76a25ea877c73868;hpb=c71dad4a2dd06aa379ed2ad02df3327622bfea80;p=vpp.git diff --git a/src/plugins/wireguard/wireguard_peer.c b/src/plugins/wireguard/wireguard_peer.c index 0dcc4e20e41..3985f4347b4 100755 --- a/src/plugins/wireguard/wireguard_peer.c +++ b/src/plugins/wireguard/wireguard_peer.c @@ -401,8 +401,13 @@ format_wg_peer (u8 * s, va_list * va) static clib_error_t * wg_peer_module_init (vlib_main_t * vm) { - wg_fib_source = fib_source_allocate ("wireguard", 0xb0, // - FIB_SOURCE_BH_SIMPLE); + /* + * use a priority better than interface source, so that + * if the same subnet is added to the wg interface and is + * used as an allowed IP, then the wireguard soueced prefix + * wins and traffic is routed to the endpoint rather than dropped + */ + wg_fib_source = fib_source_allocate ("wireguard", 0x2, FIB_SOURCE_BH_API); return (NULL); }