summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorGreg Rose <gvrose8192@gmail.com>2018-05-31 14:20:45 -0700
committerBen Pfaff <blp@ovn.org>2018-06-01 07:16:01 -0700
commit2bdd1f3d96a86bea6bdb8788f23ec7dd99b289e3 (patch)
tree57834a408ff24fe128cb6b6e4619e6276a2f36bc /utilities
parent8929c55287abae37efeac1e8876e6b3c2ccad0b9 (diff)
downloadopenvswitch-2bdd1f3d96a86bea6bdb8788f23ec7dd99b289e3.tar.gz
utilities/ovs-ctl: Force removal of ip_gre/gre
On Linux kernels older than 4.16 the user cannot take advantage of OVS ERSPAN features if the older ip_gre and gre kernel modules are loaded. In addition, the openvswitch kernel module will fail to load because it cannot grab the IPPROTO_GRE inet protocol handler since the gre kernel module has already taken it. Update the force_reload_kmod() script function to force removal of the ip_gre and gre built-in kernel modules so that the openvswitch kernel module can load and provide support for ERSPAN. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-lib.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index 4c3ad0f0b..5ba4f8b08 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -622,6 +622,14 @@ force_reload_kmod () {
action "Removing $vport module" rmmod $vport
done
+ if test -e /sys/module/ip_gre; then
+ action "Forcing removal of ip_gre module" rmmod ip_gre
+ fi
+
+ if test -e /sys/module/gre; then
+ action "Forcing removal of gre module" rmmod gre
+ fi
+
if test -e /sys/module/openvswitch; then
action "Removing openvswitch module" rmmod openvswitch
fi