[ovs-dev] [PATCH V3 31/40] lib/dpif-netlink: Fix miscompare of gre ports

William Tu u9012063 at gmail.com
Tue May 22 00:52:08 UTC 2018


On Fri, May 18, 2018 at 5:49 PM, Greg Rose <gvrose8192 at gmail.com> wrote:
> In netdev_to_ovs_vport_type() it checks for netdev types matching
> "gre" with a strstr().  This makes it match ip6gre as well and return
> OVS_VPORT_TYPE_GRE, which is clearly wrong.
>
> Move the usage of strstr() *after* all the exact matches with strcmp()
> to avoid the problem permanently because when I added the ip6gre
> type I ran into a very difficult to detect bug.
>
> Cc: Ben Pfaff <blp at ovn.org>
> Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
> ---
>
> V2 - Removed strstr for gre completely as per Ben's feedback.
> V3 - Fix mucked up V2 where strcmp was used instead of !strcmp
> ---

LGTM
Acked-by: William Tu <u9012063 at gmail.com>


More information about the dev mailing list