Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232457
b: refs/heads/master
c: 3dce38a
h: refs/heads/master
i:
  232455: 5ed7db1
v: v3
  • Loading branch information
John Fastabend authored and David S. Miller committed Jan 24, 2011
1 parent 5f5fbea commit 6e160c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 5955e7524790a2c8972487ab43347c28a1931521
refs/heads/master: 3dce38a02d6370dca690cd923619d4b00024b723
13 changes: 11 additions & 2 deletions trunk/net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb,
u8 up, idtype;
int ret = -EINVAL;

if (!tb[DCB_ATTR_APP] || !netdev->dcbnl_ops->getapp)
if (!tb[DCB_ATTR_APP])
goto out;

ret = nla_parse_nested(app_tb, DCB_APP_ATTR_MAX, tb[DCB_ATTR_APP],
Expand All @@ -604,7 +604,16 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb,
goto out;

id = nla_get_u16(app_tb[DCB_APP_ATTR_ID]);
up = netdev->dcbnl_ops->getapp(netdev, idtype, id);

if (netdev->dcbnl_ops->getapp) {
up = netdev->dcbnl_ops->getapp(netdev, idtype, id);
} else {
struct dcb_app app = {
.selector = idtype,
.protocol = id,
};
up = dcb_getapp(netdev, &app);
}

/* send this back */
dcbnl_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
Expand Down

0 comments on commit 6e160c5

Please sign in to comment.