Message ID | 20210130145611.78958-1-xiangxia.m.yue@gmail.com |
---|---|
State | New |
Headers | show |
Series | [ovs-dev,ovs] ofproto-dpif-xlate: Allow specific tunnel packets sent outside. | expand |
Bleep bloop. Greetings Tonghao Zhang, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Line has non-spaces leading whitespace WARNING: Line has trailing whitespace #36 FILE: ofproto/ofproto-dpif-xlate.c:4111: Lines checked: 43, Warnings: 2, Errors: 0 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 7108c8a30138..80c631993f05 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -4101,7 +4101,15 @@ terminate_native_tunnel(struct xlate_ctx *ctx, struct flow *flow, } } - return *tnl_port != ODPP_NONE; + /* Allow tunnel packets which source, and destination address + * are the local address to be sent outside. */ + if (*tnl_port != ODPP_NONE && + (flow->nw_src != flow->nw_dst || + !ipv6_addr_equals(&flow->ipv6_src, &flow->ipv6_dst))) { + return true; + } + + return false; } static void