Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314650
b: refs/heads/master
c: 737100e
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jun 27, 2012
1 parent 61bff48 commit 2f05f9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: c64e66c67b574f25a048886807c2007d17d50d0a
refs/heads/master: 737100e1622360b3de10550a15faf095547d972a
12 changes: 7 additions & 5 deletions trunk/net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,10 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
unsigned char *b = skb_tail_pointer(skb);
long expires;

nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags);
r = NLMSG_DATA(nlh);
nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags);
if (!nlh)
goto out_nlmsg_trim;
r = nlmsg_data(nlh);
r->rtm_family = AF_DECnet;
r->rtm_dst_len = 16;
r->rtm_src_len = 0;
Expand Down Expand Up @@ -1559,7 +1561,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
return skb->len;

nlmsg_failure:
out_nlmsg_trim:
rtattr_failure:
nlmsg_trim(skb, b);
return -1;
Expand All @@ -1572,7 +1574,7 @@ static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void
{
struct net *net = sock_net(in_skb->sk);
struct rtattr **rta = arg;
struct rtmsg *rtm = NLMSG_DATA(nlh);
struct rtmsg *rtm = nlmsg_data(nlh);
struct dn_route *rt = NULL;
struct dn_skb_cb *cb;
int err;
Expand Down Expand Up @@ -1669,7 +1671,7 @@ int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb)

if (NLMSG_PAYLOAD(cb->nlh, 0) < sizeof(struct rtmsg))
return -EINVAL;
if (!(((struct rtmsg *)NLMSG_DATA(cb->nlh))->rtm_flags&RTM_F_CLONED))
if (!(((struct rtmsg *)nlmsg_data(cb->nlh))->rtm_flags&RTM_F_CLONED))
return 0;

s_h = cb->args[0];
Expand Down

0 comments on commit 2f05f9d

Please sign in to comment.