2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

dpif-linux: Handle nl_lookup_genl_mcgroup() failures.

The nl_lookup_genl_mcgroup() function can fail on older kernels
which do not support the required netlink interface.  Before this
patch, dpif-linux would refuse to create a datapath when this
happened.  With this patch, it attempts to use a workaround.  If
the workaround fails it simply disables the affected features
without completely disabling the dpif.
This commit is contained in:
Ethan Jackson
2011-09-12 18:57:50 -07:00
parent 8f4a4df5e3
commit 213a13ed77
3 changed files with 19 additions and 5 deletions

View File

@@ -44,6 +44,7 @@
#include "netlink.h"
#include "odp-util.h"
#include "ofpbuf.h"
#include "openvswitch/datapath-compat.h"
#include "openvswitch/tunnel.h"
#include "packets.h"
#include "poll-loop.h"
@@ -1114,7 +1115,8 @@ dpif_linux_init(void)
}
if (!error) {
error = nl_lookup_genl_mcgroup(OVS_VPORT_FAMILY, OVS_VPORT_MCGROUP,
&ovs_vport_mcgroup);
&ovs_vport_mcgroup,
OVS_VPORT_MCGROUP_FALLBACK_ID);
}
if (!error) {
static struct dpif_linux_vport vport;