netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] netfilter: udp: Only get 8 bytes header in udp_pkt_to_tuple to keep consistent with tcp_pkt_to_tuple and comments
@ 2016-07-21  8:29 fgao
  2016-07-21  9:10 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: fgao @ 2016-07-21  8:29 UTC (permalink / raw)
  To: pablo, kaber, netfilter-devel, netdev; +Cc: gfree.wind, Gao Feng

From: Gao Feng <fgao@ikuai8.com>

Signed-off-by: Gao Feng <fgao@ikuai8.com>
---
 net/netfilter/nf_conntrack_proto_udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 4fd0405..a886a8a 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -45,7 +45,7 @@ static bool udp_pkt_to_tuple(const struct sk_buff *skb,
 	struct udphdr _hdr;
 
 	/* Actually only need first 8 bytes. */
-	hp = skb_header_pointer(skb, dataoff, sizeof(_hdr), &_hdr);
+	hp = skb_header_pointer(skb, dataoff, 8, &_hdr);
 	if (hp == NULL)
 		return false;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] netfilter: udp: Only get 8 bytes header in udp_pkt_to_tuple to keep consistent with tcp_pkt_to_tuple and comments
  2016-07-21  8:29 [PATCH 1/1] netfilter: udp: Only get 8 bytes header in udp_pkt_to_tuple to keep consistent with tcp_pkt_to_tuple and comments fgao
@ 2016-07-21  9:10 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2016-07-21  9:10 UTC (permalink / raw)
  To: fgao; +Cc: pablo, kaber, netfilter-devel, netdev, gfree.wind

fgao@ikuai8.com <fgao@ikuai8.com> wrote:
> From: Gao Feng <fgao@ikuai8.com>
> 
> Signed-off-by: Gao Feng <fgao@ikuai8.com>
> ---
>  net/netfilter/nf_conntrack_proto_udp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
> index 4fd0405..a886a8a 100644
> --- a/net/netfilter/nf_conntrack_proto_udp.c
> +++ b/net/netfilter/nf_conntrack_proto_udp.c
> @@ -45,7 +45,7 @@ static bool udp_pkt_to_tuple(const struct sk_buff *skb,
>  	struct udphdr _hdr;
>  
>  	/* Actually only need first 8 bytes. */
> -	hp = skb_header_pointer(skb, dataoff, sizeof(_hdr), &_hdr);
> +	hp = skb_header_pointer(skb, dataoff, 8, &_hdr);

This comment is a bit misleading; sizeof(udphdr) is 8 bytes so
this patch has no effect.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21  8:29 [PATCH 1/1] netfilter: udp: Only get 8 bytes header in udp_pkt_to_tuple to keep consistent with tcp_pkt_to_tuple and comments fgao
2016-07-21  9:10 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).