View | Details | Raw Unified | Return to bug 336 | Differences between
and this patch

Collapse All | Expand All

(-)session.c (+4 lines)
Lines 1702-1707 Link Here
1702
	break_length = packet_get_int();
1702
	break_length = packet_get_int();
1703
	packet_check_eom();
1703
	packet_check_eom();
1704
1704
1705
#if defined(TIOCSBRK) && defined(TIOCCBRK)
1705
	if (s->ttyfd == -1)
1706
	if (s->ttyfd == -1)
1706
		return 0;
1707
		return 0;
1707
	/* we will sleep from 500ms to 3000ms */
1708
	/* we will sleep from 500ms to 3000ms */
Lines 1712-1717 Link Here
1712
	usleep(break_length * 1000);
1713
	usleep(break_length * 1000);
1713
	ioctl(s->ttyfd, TIOCCBRK, NULL);
1714
	ioctl(s->ttyfd, TIOCCBRK, NULL);
1714
	return 1;
1715
	return 1;
1716
#else
1717
	return 0;
1718
#endif
1715
}
1719
}
1716
1720
1717
static int
1721
static int
(-)canohost.c (+2 lines)
Lines 159-164 Link Here
159
static void
159
static void
160
check_ip_options(int socket, char *ipaddr)
160
check_ip_options(int socket, char *ipaddr)
161
{
161
{
162
#ifdef IP_OPTIONS
162
	u_char options[200];
163
	u_char options[200];
163
	char text[sizeof(options) * 3 + 1];
164
	char text[sizeof(options) * 3 + 1];
164
	socklen_t option_size;
165
	socklen_t option_size;
Lines 181-186 Link Here
181
		packet_disconnect("Connection from %.100s with IP options:%.800s",
182
		packet_disconnect("Connection from %.100s with IP options:%.800s",
182
		    ipaddr, text);
183
		    ipaddr, text);
183
	}
184
	}
185
#endif /* IP_OPTIONS */
184
}
186
}
185
187
186
/*
188
/*
(-)openbsd-compat/bsd-misc.h (+18 lines)
Lines 93-96 Link Here
93
pid_t tcgetpgrp(int);
93
pid_t tcgetpgrp(int);
94
#endif /* HAVE_TCGETPGRP */
94
#endif /* HAVE_TCGETPGRP */
95
95
96
#ifndef CMSG_DATA
97
/* given pointer to struct cmsghdr, return pointer to data */
98
# define MY_ALIGN(p) (((u_int)(p) + (sizeof(int) - 1)) &~ (sizeof(int) - 1))
99
# define CMSG_DATA(cmsg) \
100
	((u_char *)(cmsg) + MY_ALIGN(sizeof(struct cmsghdr)))
101
#endif /* CMSG_DATA */
102
103
#ifndef CMSG_FIRSTHDR
104
/*
105
 * RFC 2292 requires to check msg_controllen, in case that the kernel returns
106
 * an empty list for some reasons.
107
 */
108
# define CMSG_FIRSTHDR(mhdr) \
109
	((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
110
	 (struct cmsghdr *)(mhdr)->msg_control : \
111
	 (struct cmsghdr *)NULL)
112
#endif /* CMSG_FIRSTHDR */
113
96
#endif /* _BSD_MISC_H */
114
#endif /* _BSD_MISC_H */

Return to bug 336