diff -urN openswan-2.4.13-orig/programs/_updown/_updown.in openswan-2.4.13/programs/_updown/_updown.in
--- openswan-2.4.13-orig/programs/_updown/_updown.in	2010-10-14 09:58:30.000000000 +0800
+++ openswan-2.4.13/programs/_updown/_updown.in	2010-10-13 19:42:31.000000000 +0800
@@ -379,6 +379,9 @@
 		it="ip route $1 0.0.0.0/1 $parms2 $parms3 &&
 			ip route $1 128.0.0.0/1 $parms2 $parms3"
 		;;
+	"0.0.0.0/32")
+		it="ip route $1 $PLUTO_PEER $parms2 $parms3"
+		;;
 	*)	it="ip route $1 $parms $parms2 $parms3"
 		;;
 	esac
diff -urN openswan-2.4.13-orig/programs/pluto/demux.c openswan-2.4.13/programs/pluto/demux.c
--- openswan-2.4.13-orig/programs/pluto/demux.c	2010-10-14 09:54:54.000000000 +0800
+++ openswan-2.4.13/programs/pluto/demux.c	2010-10-13 19:33:34.000000000 +0800
@@ -2339,19 +2339,22 @@
 	for (p = md->chain[ISAKMP_NEXT_VID]; p != NULL; p = p->next)
 	{
 #if 0
-	    char vid_string[48];
+	    char vid_string[48],dbuf[128],*dp;
 	    size_t vid_len = sizeof(vid_string) - 1 < pbs_left(&p->pbs)
 		? sizeof(vid_string) - 1 : pbs_left(&p->pbs);
 	    size_t i;
 
 	    /* make it printable by forcing bits; truncate if long */
-	    for (i = 0; i < vid_len; i++)
-		vid_string[i] = (p->pbs.cur[i] & 0x7f);
+		dp = dbuf;
+	    for (i = 0; i < vid_len; i++){
+			vid_string[i] = (p->pbs.cur[i] & 0x7f);
+	    }		
 	    vid_string[vid_len] = '\0';
 
-	    loglog(RC_LOG, "received Vendor ID Payload; ASCII hash: %s"
-		, vid_string);
-	    DBG_cond_dump(DBG_PARSING, "VID:", p->pbs.cur, pbs_left(&p->pbs));
+		for (i = 0; i < pbs_left(&p->pbs); i++)			
+			dp += sprintf(dp,"%02x",p->pbs.cur[i]);
+
+	    openswan_log("%s",dbuf);
 #endif
 	    handle_vendorid(md, p->pbs.cur, pbs_left(&p->pbs), st);
 	}
diff -urN openswan-2.4.13-orig/programs/pluto/demux.h openswan-2.4.13/programs/pluto/demux.h
--- openswan-2.4.13-orig/programs/pluto/demux.h	2010-10-14 09:55:25.000000000 +0800
+++ openswan-2.4.13/programs/pluto/demux.h	2010-10-12 16:42:57.000000000 +0800
@@ -74,6 +74,7 @@
 	*digest_roof,
 	*chain[ISAKMP_NEXT_ROOF];
     struct isakmp_quirks quirks;
+	bool is_MACOSX;
 };
 
 extern struct msg_digest *alloc_md(void);
diff -urN openswan-2.4.13-orig/programs/pluto/ipsec_doi.c openswan-2.4.13/programs/pluto/ipsec_doi.c
--- openswan-2.4.13-orig/programs/pluto/ipsec_doi.c	2010-10-14 09:55:04.000000000 +0800
+++ openswan-2.4.13/programs/pluto/ipsec_doi.c	2010-10-13 19:35:49.000000000 +0800
@@ -2169,6 +2169,10 @@
     st->st_localaddr  = md->iface->ip_addr;
     st->st_localport  = md->iface->port;
     st->st_interface  = md->iface;
+	if(md->is_MACOSX){
+		openswan_log("set forceencaps = %d ",md->is_MACOSX);
+		st->st_connection->forceencaps = md->is_MACOSX;
+	}
 
     set_cur_state(st);	/* (caller will reset cur_state) */
     st->st_try = 0;	/* not our job to try again from start */
diff -urN openswan-2.4.13-orig/programs/pluto/vendor.c openswan-2.4.13/programs/pluto/vendor.c
--- openswan-2.4.13-orig/programs/pluto/vendor.c	2010-10-14 09:55:48.000000000 +0800
+++ openswan-2.4.13/programs/pluto/vendor.c	2010-10-13 19:32:44.000000000 +0800
@@ -246,7 +246,7 @@
 	DEC_MD5_VID(NATT_IETF_03, "draft-ietf-ipsec-nat-t-ike-03")
 	DEC_MD5_VID(NATT_RFC, "RFC 3947")
 
-	DEC_MD5_VID(NATT_DRAFT_IETF_IPSEC_NAT_T_IKE,"draft-ietf-ipsec-nat-t-ike")
+	//DEC_MD5_VID(NATT_DRAFT_IETF_IPSEC_NAT_T_IKE,"draft-ietf-ipsec-nat-t-ike")
 
 	/* misc */
 
@@ -270,8 +270,8 @@
 	/**
 	 * MacOS X
 	 */
-	{ VID_MACOSX, VID_STRING|VID_SUBSTRING_DUMPHEXA, "Mac OSX 10.x",
-	  "\x4d\xf3\x79\x28\xe9\xfc\x4f\xd1\xb3\x26\x21\x70\xd5\x15\xc6\x62", NULL, 0},
+	{ VID_MACOSX, VID_KEEP, NULL, "Mac OSX 10.x",
+	  "\x4d\xf3\x79\x28\xe9\xfc\x4f\xd1\xb3\x26\x21\x70\xd5\x15\xc6\x62",16},
 
 	DEC_MD5_VID(MISC_FRAGMENTATION, "FRAGMENTATION")
 	DEC_MD5_VID(INITIAL_CONTACT, "Vid-Initial-Contact")
@@ -521,6 +521,12 @@
 	case VID_OPENSWANSELF:
 	    vid_usefull=1;
 	    break;
+
+	case VID_MACOSX:
+		md->is_MACOSX = TRUE;
+		vid_usefull = 1;
+		openswan_log("get VID_MACOSX ...");
+		break;
 	    
 	default:
 	    break;
