View | Details | Raw Unified | Return to bug 1675
Collapse All | Expand All

(-)a/canohost.c (+32 lines)
Lines 20-25 Link Here
20
#include <netinet/in.h>
20
#include <netinet/in.h>
21
#include <arpa/inet.h>
21
#include <arpa/inet.h>
22
22
23
#ifdef HAVE_BLUETOOTH
24
#include <bluetooth/bluetooth.h>
25
#include <bluetooth/rfcomm.h>
26
#endif
27
23
#include <ctype.h>
28
#include <ctype.h>
24
#include <errno.h>
29
#include <errno.h>
25
#include <netdb.h>
30
#include <netdb.h>
Lines 60-65 get_remote_hostname(int sock, int use_dns) Link Here
60
		cleanup_exit(255);
65
		cleanup_exit(255);
61
	}
66
	}
62
67
68
#ifdef HAVE_BLUETOOTH
69
	if (from.ss_family == AF_BLUETOOTH) {
70
		struct sockaddr_rc *from_rc = (void *)&from;
71
		char ba[28];
72
73
		sprintf(ba, "Bluetooth:");
74
		ba2str(&from_rc->rc_bdaddr, ba + 10);
75
		return xstrdup(ba);
76
	}
77
#endif
63
	if (from.ss_family == AF_INET)
78
	if (from.ss_family == AF_INET)
64
		check_ip_options(sock, ntop);
79
		check_ip_options(sock, ntop);
65
80
Lines 264-269 get_socket_address(int sock, int remote, int flags) Link Here
264
			return NULL;
279
			return NULL;
265
	}
280
	}
266
281
282
#ifdef HAVE_BLUETOOTH
283
	if (addr.ss_family == AF_BLUETOOTH) {
284
		struct sockaddr_rc *from_rc = (void *)&addr;
285
		char ba[28];
286
287
		sprintf(ba, "Bluetooth:");
288
		ba2str(&from_rc->rc_bdaddr, ba + 10);
289
		return xstrdup(ba);
290
	}
291
#endif
267
	/* Work around Linux IPv6 weirdness */
292
	/* Work around Linux IPv6 weirdness */
268
	if (addr.ss_family == AF_INET6)
293
	if (addr.ss_family == AF_INET6)
269
		addrlen = sizeof(struct sockaddr_in6);
294
		addrlen = sizeof(struct sockaddr_in6);
Lines 375-380 get_sock_port(int sock, int local) Link Here
375
		}
400
		}
376
	}
401
	}
377
402
403
#ifdef HAVE_BLUETOOTH
404
	if (from.ss_family == AF_BLUETOOTH) {
405
		struct sockaddr_rc *from_rc = (void *)&from;
406
407
		return from_rc->rc_channel;
408
	}
409
#endif
378
	/* Work around Linux IPv6 weirdness */
410
	/* Work around Linux IPv6 weirdness */
379
	if (from.ss_family == AF_INET6)
411
	if (from.ss_family == AF_INET6)
380
		fromlen = sizeof(struct sockaddr_in6);
412
		fromlen = sizeof(struct sockaddr_in6);
(-)a/configure.ac (+23 lines)
Lines 3636-3641 else Link Here
3636
fi
3636
fi
3637
AC_SUBST(mansubdir)
3637
AC_SUBST(mansubdir)
3638
3638
3639
# Check whether to support Bluetooth
3640
BLUETOOTH_MSG="no"
3641
AC_ARG_ENABLE(bluetooth,
3642
	[  --disable-bluetooth     disable Bluetooth support if detected [no]],
3643
	[
3644
		if test "x$enableval" = "xno" ; then
3645
			disable_bluetooth=yes
3646
		fi
3647
	]
3648
)
3649
if test -z "$disable_bluetooth" ; then
3650
	AC_CHECK_HEADERS(bluetooth/bluetooth.h,
3651
		[ AC_CHECK_LIB(bluetooth, ba2str,
3652
			[ LIBS="$LIBS -lbluetooth"
3653
			  AC_DEFINE(HAVE_BLUETOOTH, 1,
3654
				[Define if you have Bluetooth socket support])
3655
			  BLUETOOTH_MSG="yes"
3656
			])
3657
		]
3658
	)
3659
fi
3660
3639
# Check whether to enable MD5 passwords
3661
# Check whether to enable MD5 passwords
3640
MD5_MSG="no"
3662
MD5_MSG="no"
3641
AC_ARG_WITH(md5-passwords,
3663
AC_ARG_WITH(md5-passwords,
Lines 4231-4236 echo " S/KEY support: $SKEY_MSG" Link Here
4231
echo "              TCP Wrappers support: $TCPW_MSG"
4253
echo "              TCP Wrappers support: $TCPW_MSG"
4232
echo "              MD5 password support: $MD5_MSG"
4254
echo "              MD5 password support: $MD5_MSG"
4233
echo "                   libedit support: $LIBEDIT_MSG"
4255
echo "                   libedit support: $LIBEDIT_MSG"
4256
echo "                 Bluetooth support: $BLUETOOTH_MSG"
4234
echo "  Solaris process contract support: $SPC_MSG"
4257
echo "  Solaris process contract support: $SPC_MSG"
4235
echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
4258
echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
4236
echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
4259
echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
(-)a/packet.c (+4 lines)
Lines 308-313 packet_connection_is_on_socket(void) Link Here
308
		return 0;
308
		return 0;
309
	if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0)
309
	if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0)
310
		return 0;
310
		return 0;
311
#ifdef HAVE_BLUETOOTH
312
	if (from.ss_family == AF_BLUETOOTH)
313
		return 1;
314
#endif
311
	if (from.ss_family != AF_INET && from.ss_family != AF_INET6)
315
	if (from.ss_family != AF_INET && from.ss_family != AF_INET6)
312
		return 0;
316
		return 0;
313
	return 1;
317
	return 1;

Return to bug 1675