From f05920b01cc2b93f65b3dfa6eb1c0bc401234fe7 Mon Sep 17 00:00:00 2001 From: Lon Hohberger Date: Fri, 21 Aug 2009 14:21:14 -0400 Subject: [PATCH] Actually use the default port by default Signed-off-by: Lon Hohberger --- common/options.c | 2 +- include/xvm.h | 1 + server/mcast.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/options.c b/common/options.c index d50f5b0..97cde1b 100644 --- a/common/options.c +++ b/common/options.c @@ -454,7 +454,7 @@ args_init(fence_virt_args_t *args) args->net.hash = DEFAULT_HASH; args->net.auth = DEFAULT_AUTH; args->net.addr = NULL; - args->net.port = 1229; + args->net.port = DEFAULT_MCAST_PORT; args->net.ifindex = 0; args->net.family = PF_INET; args->serial.device = strdup(DEFAULT_SERIAL_DEVICE); diff --git a/include/xvm.h b/include/xvm.h index 2a9a183..b55b498 100644 --- a/include/xvm.h +++ b/include/xvm.h @@ -75,6 +75,7 @@ typedef struct __attribute__ ((packed)) _fence_req { #define RF_UUID 0x1 /* Flag specifying UUID */ uint8_t domain[MAX_DOMAINNAME_LENGTH]; /* Domain to fence*/ uint8_t address[MAX_ADDR_LEN]; /* We're this IP */ +#define DEFAULT_MCAST_PORT 1229 uint16_t port; /* Port we bound to */ uint8_t random[10]; /* Random Data */ uint32_t family; /* Address family */ diff --git a/server/mcast.c b/server/mcast.c index d2ce578..2b2f912 100644 --- a/server/mcast.c +++ b/server/mcast.c @@ -361,7 +361,7 @@ mcast_config(config_object_t *config, mcast_options *args) return -1; } - args->auth = DEFAULT_AUTH; + args->port = DEFAULT_MCAST_PORT; if (sc_get(config, "listeners/multicast/@port", value, sizeof(value)-1) == 0) { dbg_printf(1, "Got %s for port\n", value);