netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPv6: (1/5) Fix bugs in ip6_tunnel.c ICMP error handler
@ 2003-08-31 23:34 Ville Nuorvala
  2003-08-31 23:37 ` [PATCH] IPv6: (2/5) Use free_netdev() as destructor in ip6_tunnel.c Ville Nuorvala
  2003-09-01  8:41 ` [PATCH] IPv6: (1/5) Fix bugs in ip6_tunnel.c ICMP error handler David S. Miller
  0 siblings, 2 replies; 28+ messages in thread
From: Ville Nuorvala @ 2003-08-31 23:34 UTC (permalink / raw)
  To: davem, usagi-core; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 251 bytes --]

Hi,

this patch fixes two byte order bugs in ip6ip6_err(). Please apply!

Thanks,
Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications,
Helsinki University of Technology
email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1330 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1276.1.15 -> 1.1276.28.1
#	net/ipv6/ip6_tunnel.c	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/01	vnuorval@dsl-hkigw1a8b.dial.inet.fi	1.1276.28.1
# Fix byte order of info parameter in ip6ip6_err()
# --------------------------------------------
#
diff -Nru a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
--- a/net/ipv6/ip6_tunnel.c	Mon Sep  1 02:02:59 2003
+++ b/net/ipv6/ip6_tunnel.c	Mon Sep  1 02:02:59 2003
@@ -421,7 +421,7 @@
 		}
 		teli = parse_tlv_tnl_enc_lim(skb, skb->data);
 
-		if (teli && teli == info - 2) {
+		if (teli && teli == ntohl(info) - 2) {
 			tel = (struct ipv6_tlv_tnl_enc_lim *) &skb->data[teli];
 			if (tel->encap_limit == 0) {
 				if (net_ratelimit())
@@ -434,10 +434,9 @@
 		}
 		break;
 	case ICMPV6_PKT_TOOBIG:
-		mtu = info - offset;
-		if (mtu <= IPV6_MIN_MTU) {
+		mtu = ntohl(info) - offset;
+		if (mtu < IPV6_MIN_MTU)
 			mtu = IPV6_MIN_MTU;
-		}
 		t->dev->mtu = mtu;
 
 		if ((len = sizeof (*ipv6h) + ipv6h->payload_len) > mtu) {

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

end of thread, other threads:[~2003-09-05 14:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-31 23:34 [PATCH] IPv6: (1/5) Fix bugs in ip6_tunnel.c ICMP error handler Ville Nuorvala
2003-08-31 23:37 ` [PATCH] IPv6: (2/5) Use free_netdev() as destructor in ip6_tunnel.c Ville Nuorvala
2003-08-31 23:46   ` Ville Nuorvala
2003-09-01  8:45     ` David S. Miller
2003-08-31 23:48   ` [PATCH] IPv6: (3/5) Set dev->dev_addr and dev->broadcast in ip6_tnls Ville Nuorvala
2003-08-31 23:57     ` [PATCH] IPv6: (4/5) Remove sockets from ip6_tunnel.c Ville Nuorvala
2003-09-01  0:11       ` [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address Ville Nuorvala
2003-09-01  2:24         ` YOSHIFUJI Hideaki / 吉藤英明
2003-09-01  8:18           ` Ville Nuorvala
2003-09-01  9:03             ` David S. Miller
2003-09-01 10:48               ` Pekka Savola
2003-09-01 10:51                 ` David S. Miller
2003-09-01 14:24                   ` [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels Ville Nuorvala
2003-09-02 11:35                     ` David S. Miller
2003-09-02 21:37                       ` YOSHIFUJI Hideaki / 吉藤英明
2003-09-03 10:17                         ` Ville Nuorvala
2003-09-03 10:22                           ` YOSHIFUJI Hideaki / 吉藤英明
2003-09-03 11:48                           ` Pekka Savola
2003-09-03 16:57                             ` Ville Nuorvala
2003-09-05 14:31                               ` David S. Miller
2003-09-02 14:40                     ` Pekka Savola
2003-09-02 16:59                       ` Ville Nuorvala
2003-09-03  6:10                         ` Pekka Savola
2003-09-03 12:15                           ` Ville Nuorvala
2003-09-01  8:52           ` [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address David S. Miller
2003-09-01  8:48       ` [PATCH] IPv6: (4/5) Remove sockets from ip6_tunnel.c David S. Miller
2003-09-01  8:47     ` [PATCH] IPv6: (3/5) Set dev->dev_addr and dev->broadcast in ip6_tnls David S. Miller
2003-09-01  8:41 ` [PATCH] IPv6: (1/5) Fix bugs in ip6_tunnel.c ICMP error handler 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).