X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Fgenetlink.inc;h=9e7d90da78b2de36a9af10aa0bc0133c2ed8673a;hb=7fad428207c1d2ef50878da0740ee94dd57eb8bf;hp=d381e4f0c56670cb8824f5a2d568d98ca2715395;hpb=2ee6545f2bff7eb27e8c84965e3ff38dfa909bf6;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/genetlink.inc b/datapath/linux/compat/genetlink.inc index d381e4f0c..9e7d90da7 100644 --- a/datapath/linux/compat/genetlink.inc +++ b/datapath/linux/compat/genetlink.inc @@ -6,6 +6,9 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) #include +#include "openvswitch/datapath-compat.h" +#include "openvswitch/datapath-protocol.h" + static DEFINE_MUTEX(mc_group_mutex); int genl_register_mc_group(struct genl_family *family, @@ -13,9 +16,15 @@ int genl_register_mc_group(struct genl_family *family, { static int next_group = GENL_FIRST_MCGROUP; + grp->family = family; + + if (!strcmp(grp->name, OVS_VPORT_MCGROUP)) { + grp->id = OVS_VPORT_MCGROUP_FALLBACK_ID; + return 0; + } + mutex_lock(&mc_group_mutex); grp->id = next_group; - grp->family = family; if (++next_group > GENL_LAST_MCGROUP) next_group = GENL_FIRST_MCGROUP;