]> git.proxmox.com Git - ovs.git/commit
lib/dpif-netlink: Fix miscompare of gre ports
authorGreg Rose <gvrose8192@gmail.com>
Fri, 4 May 2018 23:48:43 +0000 (16:48 -0700)
committerBen Pfaff <blp@ovn.org>
Tue, 22 May 2018 03:33:30 +0000 (20:33 -0700)
commit1c385f497271182eb88afc5a38897c9781b575b3
tree1380d972b6bce22a28a81204c5ae29d6240d533f
parent3b10ceeed16306190464fc00e0887476be390208
lib/dpif-netlink: Fix miscompare of gre ports

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@ovn.org>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
lib/dpif-netlink.c