X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fwireguard%2Fwireguard_peer.c;h=30adea82647a6ef125ea80db786d2f2df3782149;hb=a26b0d11e91e9abca6220e50f0240ab6ae09c6d3;hp=04b07d97652292450fc0a846e2ab5b05568c2e92;hpb=9459d65ba43c36b3e4117e0df9d07f8e9e2babd1;p=vpp.git diff --git a/src/plugins/wireguard/wireguard_peer.c b/src/plugins/wireguard/wireguard_peer.c index 04b07d97652..30adea82647 100755 --- a/src/plugins/wireguard/wireguard_peer.c +++ b/src/plugins/wireguard/wireguard_peer.c @@ -402,8 +402,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); }