netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Maillist netdev <netdev@oss.sgi.com>
Subject: [XFRM]: Fix ICMP tempsel
Date: Sat, 19 Feb 2005 12:43:43 +0100	[thread overview]
Message-ID: <4217266F.6090700@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

The selector ports are initialized to fl_ip_sport/fl_ip_dport instead
of xfrm_flowi_sport(fl)/xfrm_flowi_dport(fl). This is wrong for ICMP,
type and code should be stored in sport and dport, in struct flowi both
are contained in fl_ip_sport.



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1664 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/02/19 12:35:18+01:00 kaber@coreworks.de 
#   [XFRM]: Fix ICMP tempsel
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv6/xfrm6_state.c
#   2005/02/19 12:35:06+01:00 kaber@coreworks.de +2 -2
#   [XFRM]: Fix ICMP tempsel
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv4/xfrm4_state.c
#   2005/02/19 12:35:06+01:00 kaber@coreworks.de +2 -2
#   [XFRM]: Fix ICMP tempsel
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
--- a/net/ipv4/xfrm4_state.c	2005-02-19 12:36:31 +01:00
+++ b/net/ipv4/xfrm4_state.c	2005-02-19 12:36:31 +01:00
@@ -20,9 +20,9 @@
 {
 	x->sel.daddr.a4 = fl->fl4_dst;
 	x->sel.saddr.a4 = fl->fl4_src;
-	x->sel.dport = fl->fl_ip_dport;
+	x->sel.dport = xfrm_flowi_dport(fl);
 	x->sel.dport_mask = ~0;
-	x->sel.sport = fl->fl_ip_sport;
+	x->sel.sport = xfrm_flowi_sport(fl);
 	x->sel.sport_mask = ~0;
 	x->sel.prefixlen_d = 32;
 	x->sel.prefixlen_s = 32;
diff -Nru a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
--- a/net/ipv6/xfrm6_state.c	2005-02-19 12:36:31 +01:00
+++ b/net/ipv6/xfrm6_state.c	2005-02-19 12:36:31 +01:00
@@ -27,9 +27,9 @@
 	 * to current session. */
 	ipv6_addr_copy((struct in6_addr *)&x->sel.daddr, &fl->fl6_dst);
 	ipv6_addr_copy((struct in6_addr *)&x->sel.saddr, &fl->fl6_src);
-	x->sel.dport = fl->fl_ip_dport;
+	x->sel.dport = xfrm_flowi_dport(fl);
 	x->sel.dport_mask = ~0;
-	x->sel.sport = fl->fl_ip_sport;
+	x->sel.sport = xfrm_flowi_sport(fl);
 	x->sel.sport_mask = ~0;
 	x->sel.prefixlen_d = 128;
 	x->sel.prefixlen_s = 128;

             reply	other threads:[~2005-02-19 11:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-19 11:43 Patrick McHardy [this message]
2005-02-19 12:23 ` [XFRM]: Fix ICMP tempsel YOSHIFUJI Hideaki / 吉藤英明
2005-02-19 18:43 ` Herbert Xu
2005-02-19 18:55   ` Patrick McHardy
2005-02-20  5:30   ` Patrick McHardy
2005-02-20  6:55     ` YOSHIFUJI Hideaki / 吉藤英明
2005-02-20  7:13       ` Patrick McHardy
2005-02-20  7:37       ` Herbert Xu
2005-02-20  8:35         ` Patrick McHardy
2005-02-20  8:58           ` YOSHIFUJI Hideaki
2005-02-20 11:12           ` Herbert Xu
2005-02-20 11:20             ` Patrick McHardy
2005-02-20 12:00               ` YOSHIFUJI Hideaki / 吉藤英明
2005-03-10  4:49 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4217266F.6090700@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).