diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_proto_sctp.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index 72b5088592dc..996db2fa21f7 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c | |||
@@ -482,15 +482,12 @@ static int sctp_to_nlattr(struct sk_buff *skb, struct nlattr *nla, | |||
482 | if (!nest_parms) | 482 | if (!nest_parms) |
483 | goto nla_put_failure; | 483 | goto nla_put_failure; |
484 | 484 | ||
485 | NLA_PUT_U8(skb, CTA_PROTOINFO_SCTP_STATE, ct->proto.sctp.state); | 485 | if (nla_put_u8(skb, CTA_PROTOINFO_SCTP_STATE, ct->proto.sctp.state) || |
486 | 486 | nla_put_be32(skb, CTA_PROTOINFO_SCTP_VTAG_ORIGINAL, | |
487 | NLA_PUT_BE32(skb, | 487 | ct->proto.sctp.vtag[IP_CT_DIR_ORIGINAL]) || |
488 | CTA_PROTOINFO_SCTP_VTAG_ORIGINAL, | 488 | nla_put_be32(skb, CTA_PROTOINFO_SCTP_VTAG_REPLY, |
489 | ct->proto.sctp.vtag[IP_CT_DIR_ORIGINAL]); | 489 | ct->proto.sctp.vtag[IP_CT_DIR_REPLY])) |
490 | 490 | goto nla_put_failure; | |
491 | NLA_PUT_BE32(skb, | ||
492 | CTA_PROTOINFO_SCTP_VTAG_REPLY, | ||
493 | ct->proto.sctp.vtag[IP_CT_DIR_REPLY]); | ||
494 | 491 | ||
495 | spin_unlock_bh(&ct->lock); | 492 | spin_unlock_bh(&ct->lock); |
496 | 493 | ||
@@ -578,9 +575,10 @@ sctp_timeout_obj_to_nlattr(struct sk_buff *skb, const void *data) | |||
578 | const unsigned int *timeouts = data; | 575 | const unsigned int *timeouts = data; |
579 | int i; | 576 | int i; |
580 | 577 | ||
581 | for (i=CTA_TIMEOUT_SCTP_UNSPEC+1; i<CTA_TIMEOUT_SCTP_MAX+1; i++) | 578 | for (i=CTA_TIMEOUT_SCTP_UNSPEC+1; i<CTA_TIMEOUT_SCTP_MAX+1; i++) { |
582 | NLA_PUT_BE32(skb, i, htonl(timeouts[i] / HZ)); | 579 | if (nla_put_be32(skb, i, htonl(timeouts[i] / HZ))) |
583 | 580 | goto nla_put_failure; | |
581 | } | ||
584 | return 0; | 582 | return 0; |
585 | 583 | ||
586 | nla_put_failure: | 584 | nla_put_failure: |