diff options
author | Sage Weil <sage@inktank.com> | 2012-06-15 12:32:04 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-06-15 12:32:04 -0700 |
commit | 9a64e8e0ace51b309fdcff4b4754b3649250382a (patch) | |
tree | 1f0d75c196c5ab0408c55ed6cf3a152f1f921e15 /net/ipv4/fib_rules.c | |
parent | f3dea7edd3d449fe7a6d402c1ce56a294b985261 (diff) | |
parent | f8f5701bdaf9134b1f90e5044a82c66324d2073f (diff) |
Merge tag 'v3.5-rc1'
Linux 3.5-rc1
Conflicts:
net/ceph/messenger.c
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r-- | net/ipv4/fib_rules.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index 799fc790b3c..2d043f71ef7 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -221,15 +221,15 @@ static int fib4_rule_fill(struct fib_rule *rule, struct sk_buff *skb, frh->src_len = rule4->src_len; frh->tos = rule4->tos; - if (rule4->dst_len) - NLA_PUT_BE32(skb, FRA_DST, rule4->dst); - - if (rule4->src_len) - NLA_PUT_BE32(skb, FRA_SRC, rule4->src); - + if ((rule4->dst_len && + nla_put_be32(skb, FRA_DST, rule4->dst)) || + (rule4->src_len && + nla_put_be32(skb, FRA_SRC, rule4->src))) + goto nla_put_failure; #ifdef CONFIG_IP_ROUTE_CLASSID - if (rule4->tclassid) - NLA_PUT_U32(skb, FRA_FLOW, rule4->tclassid); + if (rule4->tclassid && + nla_put_u32(skb, FRA_FLOW, rule4->tclassid)) + goto nla_put_failure; #endif return 0; |