From d9ddd5731d31a7bc1f0a39b7e4b0944dec7a2bdc Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 2 Feb 2010 20:20:35 +0100 Subject: bgpd: remove unused function bgp_bind_address bgp_bind_address is replaced with sockunion_bind. --- bgpd/bgp_network.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'bgpd/bgp_network.c') diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index ecad25b0..bd2e2d68 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -232,32 +232,6 @@ bgp_bind (struct peer *peer) return 0; } -static int -bgp_bind_address (int sock, struct in_addr *addr) -{ - int ret; - struct sockaddr_in local; - - memset (&local, 0, sizeof (struct sockaddr_in)); - local.sin_family = AF_INET; -#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN - local.sin_len = sizeof(struct sockaddr_in); -#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ - memcpy (&local.sin_addr, addr, sizeof (struct in_addr)); - - if ( bgpd_privs.change (ZPRIVS_RAISE) ) - zlog_err ("bgp_bind_address: could not raise privs"); - - ret = bind (sock, (struct sockaddr *)&local, sizeof (struct sockaddr_in)); - if (ret < 0) - ; - - if (bgpd_privs.change (ZPRIVS_LOWER) ) - zlog_err ("bgp_bind_address: could not lower privs"); - - return 0; -} - static int bgp_update_address (struct interface *ifp, const union sockunion *dst, union sockunion *addr) -- cgit v1.2.1