Check for SADB_X_NAT_T_NEW_MAPPING in PF_KEY kernel interface.
authorTobias Brunner <tobias@strongswan.org>
Tue, 15 Jun 2010 08:07:43 +0000 (10:07 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 15 Jun 2010 13:31:10 +0000 (15:31 +0200)
FreeBSD 8 does not support SADB_X_NAT_T_NEW_MAPPING whereas Linux and
the previous FreeBSD NAT-T patch both do.

src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c

index 1bd240a..347bada 100644 (file)
@@ -1045,7 +1045,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
 }
 #endif /*SADB_X_MIGRATE*/
 
-#ifdef HAVE_NATT
+#ifdef SADB_X_NAT_T_NEW_MAPPING
 /**
  * Process a SADB_X_NAT_T_NEW_MAPPING message from the kernel
  */
@@ -1101,7 +1101,7 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
                }
        }
 }
-#endif /*HAVE_NATT*/
+#endif /*SADB_X_NAT_T_NEW_MAPPING*/
 
 /**
  * Receives events from kernel
@@ -1163,11 +1163,11 @@ static job_requeue_t receive_events(private_kernel_pfkey_ipsec_t *this)
                        process_migrate(this, msg);
                        break;
 #endif /*SADB_X_MIGRATE*/
-#ifdef HAVE_NATT
+#ifdef SADB_X_NAT_T_NEW_MAPPING
                case SADB_X_NAT_T_NEW_MAPPING:
                        process_mapping(this, msg);
                        break;
-#endif /*HAVE_NATT*/
+#endif /*SADB_X_NAT_T_NEW_MAPPING*/
                default:
                        break;
        }