Commit c52a3f89 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[NETLINK]: Fix RTA_NEST_CANCEL().

Only skb_trim() if 'start' is non-NULL.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88121aea
......@@ -924,7 +924,8 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi
(skb)->len; })
#define RTA_NEST_CANCEL(skb, start) \
({ skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
({ if (start) \
skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
-1; })
#define RTA_GET_U32(rta) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment