From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 2/2] netfilter: conntrack: add support for DCCP handshake sequence to ctnetlink Date: Wed, 27 May 2009 17:51:31 +0200 Message-ID: <4A1D6183.3010601@trash.net> References: <20090527125242.11366.70215.stgit@Decadence> <20090527125423.11366.64989.stgit@Decadence> <4A1D4A90.6030605@trash.net> <4A1D5321.1010006@netfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: netfilter-devel@vger.kernel.org To: Pablo Neira Ayuso Return-path: Received: from stinky.trash.net ([213.144.137.162]:53097 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999AbZE0Pve (ORCPT ); Wed, 27 May 2009 11:51:34 -0400 In-Reply-To: <4A1D5321.1010006@netfilter.org> Sender: netfilter-devel-owner@vger.kernel.org List-ID: Pablo Neira Ayuso wrote: > Patrick McHardy wrote: >> Pablo Neira Ayuso wrote: >>> --- a/net/netfilter/nf_conntrack_proto_dccp.c >>> +++ b/net/netfilter/nf_conntrack_proto_dccp.c >>> @@ -639,6 +639,8 @@ static int dccp_to_nlattr(struct sk_buff *skb, >>> struct nlattr *nla, >>> NLA_PUT_U8(skb, CTA_PROTOINFO_DCCP_STATE, ct->proto.dccp.state); >>> NLA_PUT_U8(skb, CTA_PROTOINFO_DCCP_ROLE, >>> ct->proto.dccp.role[IP_CT_DIR_ORIGINAL]); >>> + NLA_PUT_U64(skb, CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ, >>> + ct->proto.dccp.handshake_seq); >> This should use big endian byteorder. > > dccp_hdr_seq() returns a value in host byte order, which is used to > assign the value to handshake_seq. So, we need to use cpu_to_be64() to > convert the value to network byte order as other attributes in ctnetlink > which are in network byte order, right? :) Absolutely :) > Patch attached. Applied to nf-next, thanks.