Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ldpd Local addresses vector is not needed anymore
details: https://anonhg.NetBSD.org/src/rev/5f1d974def12
branches: trunk
changeset: 787880:5f1d974def12
user: kefren <kefren%NetBSD.org@localhost>
date: Thu Jul 11 05:55:13 2013 +0000
description:
Local addresses vector is not needed anymore
diffstat:
usr.sbin/ldpd/fsm.c | 3 +--
usr.sbin/ldpd/ldp_peer.c | 18 +-----------------
usr.sbin/ldpd/ldp_peer.h | 3 +--
3 files changed, 3 insertions(+), 21 deletions(-)
diffs (77 lines):
diff -r d5b8451031ce -r 5f1d974def12 usr.sbin/ldpd/fsm.c
--- a/usr.sbin/ldpd/fsm.c Thu Jul 11 05:45:23 2013 +0000
+++ b/usr.sbin/ldpd/fsm.c Thu Jul 11 05:55:13 2013 +0000
@@ -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 @@
}
freeifaddrs(ifa);
- add_my_if_addrs(ia, adrcount);
return t;
}
diff -r d5b8451031ce -r 5f1d974def12 usr.sbin/ldpd/ldp_peer.c
--- a/usr.sbin/ldpd/ldp_peer.c Thu Jul 11 05:45:23 2013 +0000
+++ b/usr.sbin/ldpd/ldp_peer.c Thu Jul 11 05:55:13 2013 +0000
@@ -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 @@
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,
diff -r d5b8451031ce -r 5f1d974def12 usr.sbin/ldpd/ldp_peer.h
--- a/usr.sbin/ldpd/ldp_peer.h Thu Jul 11 05:45:23 2013 +0000
+++ b/usr.sbin/ldpd/ldp_peer.h Thu Jul 11 05:55:13 2013 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index