Local addresses vector is not needed anymore

This commit is contained in:
kefren 2013-07-11 05:55:13 +00:00
parent 2cc7bf11fa
commit 5f15a81b16
3 changed files with 3 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsm.c,v 1.11 2013/07/11 05:45:23 kefren Exp $ */
/* $NetBSD: fsm.c,v 1.12 2013/07/11 05:55:13 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -195,7 +195,6 @@ build_address_list_tlv(void)
}
freeifaddrs(ifa);
add_my_if_addrs(ia, adrcount);
return t;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ldp_peer.c,v 1.12 2013/07/11 05:45:23 kefren Exp $ */
/* $NetBSD: ldp_peer.c,v 1.13 2013/07/11 05:55:13 kefren Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -54,13 +54,10 @@
extern int ldp_holddown_time;
struct in_addr *myaddresses;
void
ldp_peer_init(void)
{
SLIST_INIT(&ldp_peer_head);
myaddresses = NULL;
}
int
@ -422,19 +419,6 @@ print_bounded_addresses(const struct ldp_peer * p)
warnp("%s\n", abuf);
}
void
add_my_if_addrs(struct in_addr * a, int count)
{
myaddresses = calloc((count + 1), sizeof(*myaddresses));
if (!myaddresses) {
fatalp("add_my_if_addrs: malloc problem\n");
return;
}
memcpy(myaddresses, a, count * sizeof(struct in_addr));
myaddresses[count].s_addr = 0;
}
/* Adds a label and a prefix to a specific peer */
int
ldp_peer_add_mapping(struct ldp_peer * p, const struct sockaddr * a,

View File

@ -1,4 +1,4 @@
/* $NetBSD: ldp_peer.h,v 1.5 2013/07/11 05:45:23 kefren Exp $ */
/* $NetBSD: ldp_peer.h,v 1.6 2013/07/11 05:55:13 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -103,7 +103,6 @@ struct ldp_peer_address * check_ifaddr(const struct ldp_peer *,
void print_bounded_addresses(const struct ldp_peer *);
void del_all_ifaddr(struct ldp_peer *);
int del_ifaddresses(struct ldp_peer *, const struct al_tlv *);
void add_my_if_addrs(struct in_addr *, int);
int ldp_peer_add_mapping(struct ldp_peer *, const struct sockaddr *, int, int);
int ldp_peer_delete_mapping(struct ldp_peer *, const struct sockaddr *, int);