Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314259
b: refs/heads/master
c: ab6d470
h: refs/heads/master
i:
  314257: 20074b3
  314255: b1f2699
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Jun 13, 2012
1 parent 25b3f20 commit 88028cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77c6849d7aca31a0743be51412853079fcea03e0
refs/heads/master: ab6d470735682a6e1ba889a66f56eb1640242096
16 changes: 2 additions & 14 deletions trunk/net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,36 +1328,24 @@ static int dcbnl_notify(struct net_device *dev, int event, int cmd,
struct net *net = dev_net(dev);
struct sk_buff *skb;
struct nlmsghdr *nlh;
struct dcbmsg *dcb;
const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
int err;

if (!ops)
return -EOPNOTSUPP;

skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
skb = dcbnl_newmsg(event, cmd, pid, seq, 0, &nlh);
if (!skb)
return -ENOBUFS;

nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0);
if (nlh == NULL) {
nlmsg_free(skb);
return -EMSGSIZE;
}

dcb = NLMSG_DATA(nlh);
dcb->dcb_family = AF_UNSPEC;
dcb->cmd = cmd;

if (dcbx_ver == DCB_CAP_DCBX_VER_IEEE)
err = dcbnl_ieee_fill(skb, dev);
else
err = dcbnl_cee_fill(skb, dev);

if (err < 0) {
/* Report error to broadcast listeners */
nlmsg_cancel(skb, nlh);
kfree_skb(skb);
nlmsg_free(skb);
rtnl_set_sk_err(net, RTNLGRP_DCB, err);
} else {
/* End nlmsg and notify broadcast listeners */
Expand Down

0 comments on commit 88028cf

Please sign in to comment.