diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-06-19 01:51:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-19 01:51:26 -0400 |
commit | c52a3f89f882b84fc422000655c023fe73e701cf (patch) | |
tree | 25069c0f52b19bc0ffef80aa0cb41193e0a483f6 /include/linux/rtnetlink.h | |
parent | 88121aea7bdb5fdc527388e262381829c4e1db16 (diff) |
[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>
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r-- | include/linux/rtnetlink.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 5a5cda160267..6fff8c4c99c7 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -924,7 +924,8 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
924 | (skb)->len; }) | 924 | (skb)->len; }) |
925 | 925 | ||
926 | #define RTA_NEST_CANCEL(skb, start) \ | 926 | #define RTA_NEST_CANCEL(skb, start) \ |
927 | ({ skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | 927 | ({ if (start) \ |
928 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | ||
928 | -1; }) | 929 | -1; }) |
929 | 930 | ||
930 | #define RTA_GET_U32(rta) \ | 931 | #define RTA_GET_U32(rta) \ |