X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Furpf%2Furpf_dp.h;h=bfe1f659171c943e5b7b41c38f9852412664d4fe;hb=refs%2Fchanges%2F20%2F26520%2F3;hp=3d3f19cfb1d02d4e2fcd5a04ab03a1c77b952d28;hpb=1e8d949781a44846dabbf56e1aab80bbf4cc8d59;p=vpp.git diff --git a/src/plugins/urpf/urpf_dp.h b/src/plugins/urpf/urpf_dp.h index 3d3f19cfb1d..bfe1f659171 100644 --- a/src/plugins/urpf/urpf_dp.h +++ b/src/plugins/urpf/urpf_dp.h @@ -178,7 +178,7 @@ urpf_inline (vlib_main_t * vm, { /* for RX the check is: would this source adddress be forwarded * out of the interface on which it was recieved, if yes allow. - * For TX it's; would this source addres be forwarded out of the + * For TX it's; would this source address be forwarded out of the * interface through which it is being sent, if yes drop. */ int res0, res1; @@ -197,6 +197,10 @@ urpf_inline (vlib_main_t * vm, { pass0 |= !res0 && fib_urpf_check_size (lb0->lb_urpf); pass1 |= !res1 && fib_urpf_check_size (lb1->lb_urpf); + + /* allow locally generated */ + pass0 |= b[0]->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED; + pass1 |= b[1]->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED; } } else @@ -290,7 +294,10 @@ urpf_inline (vlib_main_t * vm, if (VLIB_RX == dir) pass0 |= res0; else - pass0 |= !res0 && fib_urpf_check_size (lb0->lb_urpf); + { + pass0 |= !res0 && fib_urpf_check_size (lb0->lb_urpf); + pass0 |= b[0]->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED; + } } else pass0 |= fib_urpf_check_size (lb0->lb_urpf);