aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-28 00:57:03 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-28 00:57:03 -0400
commit1d1e34ddd48d27def2f324c1e3be16d460b16436 (patch)
tree79937379cbc0498cb3a611df4d14362dbe45f6cd /include/net/xfrm.h
parent160c85f0e050d92c0e42321aab2ffc343594e1c0 (diff)
xfrm_user: Propagate netlink error codes properly.
Instead of using a fixed value of "-1" or "-EMSGSIZE", propagate what the nla_*() interfaces actually return. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index e0a55df5bde8..17acbc92476d 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1682,13 +1682,11 @@ static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m)
1682 1682
1683static inline int xfrm_mark_put(struct sk_buff *skb, const struct xfrm_mark *m) 1683static inline int xfrm_mark_put(struct sk_buff *skb, const struct xfrm_mark *m)
1684{ 1684{
1685 if ((m->m | m->v) && 1685 int ret = 0;
1686 nla_put(skb, XFRMA_MARK, sizeof(struct xfrm_mark), m))
1687 goto nla_put_failure;
1688 return 0;
1689 1686
1690nla_put_failure: 1687 if (m->m | m->v)
1691 return -1; 1688 ret = nla_put(skb, XFRMA_MARK, sizeof(struct xfrm_mark), m);
1689 return ret;
1692} 1690}
1693 1691
1694#endif /* _NET_XFRM_H */ 1692#endif /* _NET_XFRM_H */