hastd.c (207348) | hastd.c (207371) |
---|---|
1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sbin/hastd/hastd.c 207348 2010-04-28 22:41:06Z pjd $"); | 31__FBSDID("$FreeBSD: head/sbin/hastd/hastd.c 207371 2010-04-29 15:36:32Z pjd $"); |
32 33#include <sys/param.h> 34#include <sys/linker.h> 35#include <sys/module.h> 36#include <sys/wait.h> 37 38#include <assert.h> 39#include <err.h> --- 142 unchanged lines hidden (view full) --- 182 pjdlog_errno(LOG_ERR, "Unable to accept connection %s", laddr); 183 return; 184 } 185 186 proto_local_address(conn, laddr, sizeof(laddr)); 187 proto_remote_address(conn, raddr, sizeof(raddr)); 188 pjdlog_info("Connection from %s to %s.", laddr, raddr); 189 | 32 33#include <sys/param.h> 34#include <sys/linker.h> 35#include <sys/module.h> 36#include <sys/wait.h> 37 38#include <assert.h> 39#include <err.h> --- 142 unchanged lines hidden (view full) --- 182 pjdlog_errno(LOG_ERR, "Unable to accept connection %s", laddr); 183 return; 184 } 185 186 proto_local_address(conn, laddr, sizeof(laddr)); 187 proto_remote_address(conn, raddr, sizeof(raddr)); 188 pjdlog_info("Connection from %s to %s.", laddr, raddr); 189 |
190 /* Error in setting timeout is not critical, but why should it fail? */ 191 if (proto_timeout(conn, HAST_TIMEOUT) < 0) 192 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); 193 |
|
190 nvin = nvout = nverr = NULL; 191 192 /* 193 * Before receiving any data see if remote host have access to any 194 * resource. 195 */ 196 TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { 197 if (proto_address_match(conn, res->hr_remoteaddr)) --- 333 unchanged lines hidden --- | 194 nvin = nvout = nverr = NULL; 195 196 /* 197 * Before receiving any data see if remote host have access to any 198 * resource. 199 */ 200 TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { 201 if (proto_address_match(conn, res->hr_remoteaddr)) --- 333 unchanged lines hidden --- |