Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3017
b: refs/heads/master
c: 7c99c90
h: refs/heads/master
i:
  3015: 98d3c92
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jun 23, 2005
1 parent f6103c1 commit e2aef6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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: 317a76f9a44b437d6301718f4e5d08bd93f98da7
refs/heads/master: 7c99c909fa69a183c1b80bd64fb9f0d11459aff3
9 changes: 2 additions & 7 deletions trunk/net/ipv4/tcp_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ struct tcpdiag_entry
static struct sock *tcpnl;

#define TCPDIAG_PUT(skb, attrtype, attrlen) \
({ int rtalen = RTA_LENGTH(attrlen); \
struct rtattr *rta; \
if (skb_tailroom(skb) < RTA_ALIGN(rtalen)) goto nlmsg_failure; \
rta = (void*)__skb_put(skb, RTA_ALIGN(rtalen)); \
rta->rta_type = attrtype; \
rta->rta_len = rtalen; \
RTA_DATA(rta); })
RTA_DATA(__RTA_PUT(skb, attrtype, attrlen))

static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
int ext, u32 pid, u32 seq, u16 nlmsg_flags)
Expand Down Expand Up @@ -167,6 +161,7 @@ static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
nlh->nlmsg_len = skb->tail - b;
return skb->len;

rtattr_failure:
nlmsg_failure:
skb_trim(skb, b - skb->data);
return -1;
Expand Down

0 comments on commit e2aef6c

Please sign in to comment.