use the right IP from the passed structure in takeip/releaseip calls
authorAndrew Tridgell <tridge@samba.org>
Mon, 4 Jun 2007 13:54:56 +0000 (23:54 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 4 Jun 2007 13:54:56 +0000 (23:54 +1000)
takeover/ctdb_takeover.c

index bf9d3982de89c44a1eac29c6ce8596f06f302e12..5e0b02513a0eab9de5b0e305a27f125cae1d4808 100644 (file)
@@ -180,7 +180,7 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
        state->c = talloc_steal(ctdb, c);
        state->sin = talloc(ctdb, struct sockaddr_in);       
        CTDB_NO_MEMORY(ctdb, state->sin);
-       *state->sin = *(struct sockaddr_in *)indata.dptr;       
+       *state->sin = pip->sin;
 
        DEBUG(0,("Takover of IP %s/%u on interface %s\n", 
                 ip, ctdb->nodes[ctdb->vnn]->public_netmask_bits, 
@@ -284,7 +284,7 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
        state->c = talloc_steal(state, c);
        state->sin = talloc(state, struct sockaddr_in);       
        CTDB_NO_MEMORY(ctdb, state->sin);
-       *state->sin = *(struct sockaddr_in *)indata.dptr;       
+       *state->sin = pip->sin;
 
        ret = ctdb_event_script_callback(ctdb, state, release_ip_callback, state,
                                         "releaseip %s %s %u",