mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 22:44:27 +08:00
[NETLINK]: Fix RTA_NEST_CANCEL().
Only skb_trim() if 'start' is non-NULL. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
88121aea7b
commit
c52a3f89f8
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user