netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [XFRM]: Fix ICMP tempsel
@ 2005-02-19 11:43 Patrick McHardy
  2005-02-19 12:23 ` YOSHIFUJI Hideaki / 吉藤英明
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Patrick McHardy @ 2005-02-19 11:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: Herbert Xu, Maillist netdev

[-- 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;

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

end of thread, other threads:[~2005-03-10  4:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-19 11:43 [XFRM]: Fix ICMP tempsel Patrick McHardy
2005-02-19 12:23 ` 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

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).