Module Name:    src
Committed By:   msaitoh
Date:           Sun Jun  9 16:39:43 UTC 2013

Modified Files:
        src/sys/netinet [netbsd-5]: ip_icmp.c

Log Message:
Pull up following revision(s) (requested by fair in ticket #1855):
        sys/netinet/ip_icmp.c: revision 1.130
PR/47693: Erik E. Fair: Add missing code to icmp handling.
- While there, add the rest of the missing codes
- Merge groups
- Fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.6.1 src/sys/netinet/ip_icmp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.120 src/sys/netinet/ip_icmp.c:1.120.6.1
--- src/sys/netinet/ip_icmp.c:1.120	Wed Jun 18 09:06:28 2008
+++ src/sys/netinet/ip_icmp.c	Sun Jun  9 16:39:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_icmp.c,v 1.120 2008/06/18 09:06:28 yamt Exp $	*/
+/*	$NetBSD: ip_icmp.c,v 1.120.6.1 2013/06/09 16:39:43 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.120 2008/06/18 09:06:28 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.120.6.1 2013/06/09 16:39:43 msaitoh Exp $");
 
 #include "opt_ipsec.h"
 
@@ -451,45 +451,42 @@ icmp_input(struct mbuf *m, ...)
 
 	case ICMP_UNREACH:
 		switch (code) {
-			case ICMP_UNREACH_NET:
-				code = PRC_UNREACH_NET;
-				break;
-
-			case ICMP_UNREACH_HOST:
-				code = PRC_UNREACH_HOST;
-				break;
-
-			case ICMP_UNREACH_PROTOCOL:
-				code = PRC_UNREACH_PROTOCOL;
-				break;
+		case ICMP_UNREACH_PROTOCOL:
+			code = PRC_UNREACH_PROTOCOL;
+			break;
 
-			case ICMP_UNREACH_PORT:
-				code = PRC_UNREACH_PORT;
-				break;
+		case ICMP_UNREACH_PORT:
+			code = PRC_UNREACH_PORT;
+			break;
 
-			case ICMP_UNREACH_SRCFAIL:
-				code = PRC_UNREACH_SRCFAIL;
-				break;
+		case ICMP_UNREACH_SRCFAIL:
+			code = PRC_UNREACH_SRCFAIL;
+			break;
 
-			case ICMP_UNREACH_NEEDFRAG:
-				code = PRC_MSGSIZE;
-				break;
+		case ICMP_UNREACH_NEEDFRAG:
+			code = PRC_MSGSIZE;
+			break;
 
-			case ICMP_UNREACH_NET_UNKNOWN:
-			case ICMP_UNREACH_NET_PROHIB:
-			case ICMP_UNREACH_TOSNET:
-				code = PRC_UNREACH_NET;
-				break;
+		case ICMP_UNREACH_NET:
+		case ICMP_UNREACH_NET_UNKNOWN:
+		case ICMP_UNREACH_NET_PROHIB:
+		case ICMP_UNREACH_TOSNET:
+			code = PRC_UNREACH_NET;
+			break;
 
-			case ICMP_UNREACH_HOST_UNKNOWN:
-			case ICMP_UNREACH_ISOLATED:
-			case ICMP_UNREACH_HOST_PROHIB:
-			case ICMP_UNREACH_TOSHOST:
-				code = PRC_UNREACH_HOST;
-				break;
+		case ICMP_UNREACH_HOST:
+		case ICMP_UNREACH_HOST_UNKNOWN:
+		case ICMP_UNREACH_ISOLATED:
+		case ICMP_UNREACH_HOST_PROHIB:
+		case ICMP_UNREACH_TOSHOST:
+		case ICMP_UNREACH_ADMIN_PROHIBIT:
+		case ICMP_UNREACH_HOST_PREC:
+		case ICMP_UNREACH_PREC_CUTOFF:
+			code = PRC_UNREACH_HOST;
+			break;
 
-			default:
-				goto badcode;
+		default:
+			goto badcode;
 		}
 		goto deliver;
 

Reply via email to