~andreserl/ubuntu/lucid/keepalived/merge-from-squeeze-lp519940

« back to all changes in this revision

Viewing changes to keepalived/vrrp/vrrp_ipaddress.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-05-12 20:26:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090512202615-k850bw35qpuvpq4p
Tags: 1.1.17-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules: DEB_UPDATE_RCD_PARAMS := expicit init start/stop
    parameters (don't stop at 0 and 6)
  - debian/init.d: init script header adapted to stop rule
  - debian/keepalived.postinst: Remove shutdown and reboot links

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Part:        NETLINK IPv4 address manipulation.
7
7
 *
8
 
 * Version:     $Id: vrrp_ipaddress.c,v 1.1.15 2007/09/15 04:07:41 acassen Exp $
 
8
 * Version:     $Id: vrrp_ipaddress.c,v 1.1.17 2009/03/05 01:31:12 acassen Exp $
9
9
 *
10
10
 * Author:      Alexandre Cassen, <acassen@linux-vs.org>
11
11
 *
19
19
 *              as published by the Free Software Foundation; either version
20
20
 *              2 of the License, or (at your option) any later version.
21
21
 *
22
 
 * Copyright (C) 2001-2007 Alexandre Cassen, <acassen@freebox.fr>
 
22
 * Copyright (C) 2001-2009 Alexandre Cassen, <acassen@freebox.fr>
23
23
 */
24
24
 
25
25
/* local include */
26
26
#include "vrrp_ipaddress.h"
27
27
#include "vrrp_netlink.h"
28
28
#include "vrrp_data.h"
 
29
#include "logger.h"
29
30
#include "memory.h"
30
31
#include "utils.h"
31
32
 
103
104
dump_ipaddress(void *if_data_obj)
104
105
{
105
106
        ip_address *ip_addr = if_data_obj;
106
 
        syslog(LOG_INFO, "     %s/%d brd %s dev %s scope %s%s%s"
 
107
        log_message(LOG_INFO, "     %s/%d brd %s dev %s scope %s%s%s"
107
108
               , inet_ntop2(ip_addr->addr)
108
109
               , ip_addr->mask
109
110
               , inet_ntop2(ip_addr->broadcast)
137
138
                if (!strcmp(str, "dev")) {
138
139
                        new->ifp = if_get_by_ifname(VECTOR_SLOT(strvec, ++i));
139
140
                        if (!new->ifp) {
140
 
                                syslog(LOG_INFO, "VRRP is trying to assign VIP to unknown %s"
 
141
                                log_message(LOG_INFO, "VRRP is trying to assign VIP to unknown %s"
141
142
                                       " interface !!! go out and fixe your conf !!!",
142
143
                                       (char *)VECTOR_SLOT(strvec, i));
143
144
                                FREE(new);
193
194
 
194
195
        /* All addresses removed */
195
196
        if (LIST_ISEMPTY(n)) {
196
 
                syslog(LOG_INFO, "Removing a VIP|E-VIP block");
 
197
                log_message(LOG_INFO, "Removing a VIP|E-VIP block");
197
198
                netlink_iplist_ipv4(l, IPADDRESS_DEL);
198
199
                return;
199
200
        }
201
202
        for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) {
202
203
                ipaddress = ELEMENT_DATA(e);
203
204
                if (!address_exist(n, ipaddress) && ipaddress->set) {
204
 
                        syslog(LOG_INFO, "ip address %s/%d dev %s, no longer exist"
 
205
                        log_message(LOG_INFO, "ip address %s/%d dev %s, no longer exist"
205
206
                               , inet_ntop2(ipaddress->addr)
206
207
                               , ipaddress->mask
207
208
                               , IF_NAME(if_get_by_ifindex(ipaddress->ifindex)));