diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-02 20:20:35 +0100 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-11-21 19:42:05 +0400 |
commit | 2fbd6f5a62f654c59aec5e1707c859d6ed79c6b0 (patch) | |
tree | cc70afc89da575cdb739d7e1723632e7b75b654c /bgpd | |
parent | 1727d2e2b939c8670d0f0e0d1a0e5eb0a8be2135 (diff) |
bgpd: remove unused function bgp_bind_address
bgp_bind_address is replaced with sockunion_bind.
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_network.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index b9cb6223..274a989d 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -238,32 +238,6 @@ bgp_bind (struct peer *peer) } 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) { |