changed order of server and peer reflexive endpoints (and also the priorities)
authorTobias Brunner <tobias@strongswan.org>
Mon, 31 Mar 2008 10:56:49 +0000 (10:56 -0000)
committerTobias Brunner <tobias@strongswan.org>
Mon, 31 Mar 2008 10:56:49 +0000 (10:56 -0000)
src/charon/encoding/payloads/endpoint_notify.c
src/charon/encoding/payloads/endpoint_notify.h

index ed5378e..03fc153 100644 (file)
@@ -73,8 +73,8 @@ struct private_endpoint_notify_t {
 
 ENUM(me_endpoint_type_names, HOST, RELAYED,
        "HOST",
-       "SERVER_REFLEXIVE",
        "PEER_REFLEXIVE",
+       "SERVER_REFLEXIVE",
        "RELAYED"
 );
 
@@ -362,12 +362,12 @@ endpoint_notify_t *endpoint_notify_create_from_host(me_endpoint_type_t type, hos
                case HOST:
                        this->priority = pow(2, 16) * ME_PRIO_HOST; 
                        break;
-               case SERVER_REFLEXIVE:
-                       this->priority = pow(2, 16) * ME_PRIO_SERVER; 
-                       break;
                case PEER_REFLEXIVE:
                        this->priority = pow(2, 16) * ME_PRIO_PEER; 
                        break;
+               case SERVER_REFLEXIVE:
+                       this->priority = pow(2, 16) * ME_PRIO_SERVER; 
+                       break;
                case RELAYED:
                default:
                        this->priority = pow(2, 16) * ME_PRIO_RELAY; 
index 88b63a6..d236c95 100644 (file)
@@ -24,8 +24,8 @@
 #define ENDPOINT_NOTIFY_H_
 
 #define ME_PRIO_HOST   255
-#define ME_PRIO_SERVER 100
-#define ME_PRIO_PEER   120
+#define ME_PRIO_PEER   128
+#define ME_PRIO_SERVER 64
 #define ME_PRIO_RELAY  0
 
 typedef enum me_endpoint_family_t me_endpoint_family_t;
@@ -58,9 +58,9 @@ enum me_endpoint_type_t {
        
        HOST = 1,
        
-       SERVER_REFLEXIVE = 2,
+       PEER_REFLEXIVE = 2,
        
-       PEER_REFLEXIVE = 3,
+       SERVER_REFLEXIVE = 3,
        
        RELAYED = 4,