X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdatapath.c;h=4dde50b22c2ccbf96693105bce635d07987aa435;hb=734ec5ec13499a2e7112626564cc9bd0c2d06600;hp=23fb1dc83b6727944ace1bb476f019e624b4b09a;hpb=95b1d73a4a6944a44c028b771a339d2971d93071;p=openvswitch diff --git a/datapath/datapath.c b/datapath/datapath.c index 23fb1dc8..4dde50b2 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -62,8 +62,8 @@ #include "vport-internal_dev.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) || \ - LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) -#error Kernels before 2.6.18 or after 3.2 are not supported by this version of Open vSwitch. + LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +#error Kernels before 2.6.18 or after 3.3 are not supported by this version of Open vSwitch. #endif #define REHASH_FLOW_INTERVAL (10 * 60 * HZ) @@ -1729,6 +1729,9 @@ static struct vport *lookup_vport(struct net *net, vport = ovs_vport_locate(net, nla_data(a[OVS_VPORT_ATTR_NAME])); if (!vport) return ERR_PTR(-ENODEV); + if (ovs_header->dp_ifindex && + ovs_header->dp_ifindex != get_dpifindex(vport->dp)) + return ERR_PTR(-ENODEV); return vport; } else if (a[OVS_VPORT_ATTR_PORT_NO]) { u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]); @@ -2161,7 +2164,7 @@ static int __init dp_init(void) BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > sizeof(dummy_skb->cb)); pr_info("Open vSwitch switching datapath %s, built "__DATE__" "__TIME__"\n", - VERSION BUILDNR); + VERSION); err = genl_exec_init(); if (err)