Subject: kern/7924: ipsec.c won't compile w/out INET6
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@mediaone.net>
List: netbsd-bugs
Date: 07/05/1999 20:23:34
>Number:         7924
>Category:       kern
>Synopsis:       ipsec.c won't compile w/out INET6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul  5 20:20:04 1999
>Last-Modified:
>Originator:     Charlie Root
>Organization:
	none
>Release:        7/5/99
>Environment:
	
System: NetBSD groo-the-wanderer.waterside.net 1.4D NetBSD 1.4D (GROO) #0: Mon Jul 5 11:34:43 EDT 1999 rafal@groo-the-wanderer.old-oak.net:/usr/src/sys/arch/i386/compile/GROO i386


>Description:
	ipsec.c sysctl routine refers to variables declared only if INET6.
	If no INET6, the compiler whines and the kernel build stops.
>How-To-Repeat:
	build kernel with IPSEC, no INET6

>Fix:
	How about the following:
	
--- ipsec.c.orig	Mon Jul  5 11:05:26 1999
+++ ipsec.c	Mon Jul  5 18:17:47 1999
@@ -3074,19 +3074,19 @@
 			}
 		}
 		return sysctl_int(oldp, oldlenp, newp, newlen,
-				  &ip6_def_policy.policy);
+				  &ip4_def_policy.policy);
 	case IPSECCTL_DEF_ESP_TRANSLEV:
 		return sysctl_int(oldp, oldlenp, newp, newlen,
-				  &ip6_esp_trans_deflev);
+				  &ip4_esp_trans_deflev);
 	case IPSECCTL_DEF_ESP_NETLEV:
 		return sysctl_int(oldp, oldlenp, newp, newlen,
-				  &ip6_esp_net_deflev);
+				  &ip4_esp_net_deflev);
 	case IPSECCTL_DEF_AH_TRANSLEV:
 		return sysctl_int(oldp, oldlenp, newp, newlen,
-				  &ip6_ah_trans_deflev);
+				  &ip4_ah_trans_deflev);
 	case IPSECCTL_DEF_AH_NETLEV:
 		return sysctl_int(oldp, oldlenp, newp, newlen,
-				  &ip6_ah_net_deflev);
+				  &ip4_ah_net_deflev);
 	case IPSECCTL_INBOUND_CALL_IKE:
 		return sysctl_int(oldp, oldlenp, newp, newlen,
 				  &ip4_inbound_call_ike);
>Audit-Trail:
>Unformatted: