~ubuntu-branches/ubuntu/raring/openvswitch/raring

« back to all changes in this revision

Viewing changes to datapath/brcompat.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-10-23 17:24:17 UTC
  • Revision ID: package-import@ubuntu.com-20121023172417-26590u7zfr4r795j
Tags: 1.4.3-0ubuntu2
* Re-enable the openvswitch-datapath-dkms package to enable support
  for gre tunnels between virtual switches which is not supported
  in the kernel provided openvswitch module (LP: #1068365). 
  - d/patches/0001->0008*.patch: Cherry picked patches from upstream
    trunk which enable support for the 3.5 linux kernel and align
    dkms module naming with kernel module naming.
  - d/dkms.conf.in: Drop _mod postfix from dkms module names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                goto error;
63
63
 
64
64
        genlmsg_put(skb, 0, 0, &brc_genl_family, 0, op);
65
 
        if (bridge)
66
 
                NLA_PUT_STRING(skb, BRC_GENL_A_DP_NAME, bridge);
67
 
        if (port)
68
 
                NLA_PUT_STRING(skb, BRC_GENL_A_PORT_NAME, port);
 
65
 
 
66
        if (bridge && nla_put_string(skb, BRC_GENL_A_DP_NAME, bridge))
 
67
                goto nla_put_failure;
 
68
        if (port && nla_put_string(skb, BRC_GENL_A_PORT_NAME, port))
 
69
                goto nla_put_failure;
 
70
 
69
71
        return skb;
70
72
 
71
73
nla_put_failure:
284
286
        request = brc_make_request(BRC_GENL_C_FDB_QUERY, dev->name, NULL);
285
287
        if (!request)
286
288
                return -ENOMEM;
287
 
        NLA_PUT_U64(request, BRC_GENL_A_FDB_COUNT, maxnum);
288
 
        NLA_PUT_U64(request, BRC_GENL_A_FDB_SKIP, offset);
 
289
        if (nla_put_u64(request, BRC_GENL_A_FDB_COUNT, maxnum) ||
 
290
            nla_put_u64(request, BRC_GENL_A_FDB_SKIP, offset))
 
291
                goto nla_put_failure;
289
292
 
290
293
        rtnl_unlock();
291
294
        reply = brc_send_command(request, attrs);
396
399
                err = -ENOMEM;
397
400
                goto err;
398
401
        }
399
 
        NLA_PUT_U32(ans_skb, BRC_GENL_A_MC_GROUP, brc_mc_group.id);
 
402
        if (nla_put_u32(ans_skb, BRC_GENL_A_MC_GROUP, brc_mc_group.id))
 
403
                goto nla_put_failure;
400
404
 
401
405
        genlmsg_end(ans_skb, data);
402
406
        return genlmsg_reply(ans_skb, info);
516
520
        /* Set the bridge ioctl handler */
517
521
        brioctl_set(brc_ioctl_deviceless_stub);
518
522
 
519
 
        /* Set the openvswitch_mod device ioctl handler */
 
523
        /* Set the openvswitch device ioctl handler */
520
524
        ovs_dp_ioctl_hook = brc_dev_ioctl;
521
525
 
522
526
        /* Randomize the initial sequence number.  This is not a security
565
569
/*
566
570
 * In kernels 2.6.36 and later, Open vSwitch can safely coexist with
567
571
 * the Linux bridge module, but it does not make sense to load both bridge and
568
 
 * brcompat_mod, so this prevents it.
 
572
 * brcompat, so this prevents it.
569
573
 */
570
574
BRIDGE_MUTUAL_EXCLUSION;
571
575
#endif