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

(-)a/conf.c (-3 / +3 lines)
Lines 1305-1317 void conf(struct ctx *c, int argc, char **argv) Link Here
1305
			if (logfile)
1305
			if (logfile)
1306
				die("Can't log to both file and stderr");
1306
				die("Can't log to both file and stderr");
1307
1307
1308
			if (c->stderr)
1308
			if (c->_stderr)
1309
				die("Multiple --stderr options given");
1309
				die("Multiple --stderr options given");
1310
1310
1311
			c->stderr = 1;
1311
			c->_stderr = 1;
1312
			break;
1312
			break;
1313
		case 'l':
1313
		case 'l':
1314
			if (c->stderr)
1314
			if (c->_stderr)
1315
				die("Can't log to both stderr and file");
1315
				die("Can't log to both stderr and file");
1316
1316
1317
			if (logfile)
1317
			if (logfile)
(-)a/passt.c (-1 / +1 lines)
Lines 241-247 int main(int argc, char **argv) Link Here
241
	conf(&c, argc, argv);
241
	conf(&c, argc, argv);
242
	trace_init(c.trace);
242
	trace_init(c.trace);
243
243
244
	if (c.stderr || isatty(fileno(stdout)))
244
	if (c._stderr || isatty(fileno(stdout)))
245
		__openlog(log_name, LOG_PERROR, LOG_DAEMON);
245
		__openlog(log_name, LOG_PERROR, LOG_DAEMON);
246
246
247
	quit_fd = pasta_netns_quit_init(&c);
247
	quit_fd = pasta_netns_quit_init(&c);
(-)a/passt.h (-2 / +2 lines)
Lines 32-38 struct tap_l4_msg { Link Here
32
union epoll_ref;
32
union epoll_ref;
33
33
34
#include <stdbool.h>
34
#include <stdbool.h>
35
35
#include <bits/limits.h>
36
#include "packet.h"
36
#include "packet.h"
37
#include "icmp.h"
37
#include "icmp.h"
38
#include "port_fwd.h"
38
#include "port_fwd.h"
Lines 197-203 struct ctx { Link Here
197
	int trace;
197
	int trace;
198
	int quiet;
198
	int quiet;
199
	int foreground;
199
	int foreground;
200
	int stderr;
200
	int _stderr;
201
	int nofile;
201
	int nofile;
202
	char sock_path[UNIX_PATH_MAX];
202
	char sock_path[UNIX_PATH_MAX];
203
	char pcap[PATH_MAX];
203
	char pcap[PATH_MAX];
(-)a/util.h (+14 lines)
Lines 7-13 Link Here
7
#define UTIL_H
7
#define UTIL_H
8
8
9
#include <stdlib.h>
9
#include <stdlib.h>
10
#include <stdio.h>
10
#include <stdarg.h>
11
#include <stdarg.h>
12
#include <signal.h>
13
#include <byteswap.h>
11
14
12
#include "log.h"
15
#include "log.h"
13
16
Lines 88-93 Link Here
88
#define MAC_ZERO		((uint8_t [ETH_ALEN]){ 0 })
91
#define MAC_ZERO		((uint8_t [ETH_ALEN]){ 0 })
89
#define MAC_IS_ZERO(addr)	(!memcmp((addr), MAC_ZERO, ETH_ALEN))
92
#define MAC_IS_ZERO(addr)	(!memcmp((addr), MAC_ZERO, ETH_ALEN))
90
93
94
#if defined(__GLIBC__) || defined(__UCLIBC__)
95
91
#if __BYTE_ORDER == __BIG_ENDIAN
96
#if __BYTE_ORDER == __BIG_ENDIAN
92
#define	htons_constant(x)	(x)
97
#define	htons_constant(x)	(x)
93
#define	htonl_constant(x)	(x)
98
#define	htonl_constant(x)	(x)
Lines 96-101 Link Here
96
#define	htonl_constant(x)	(__bswap_constant_32(x))
101
#define	htonl_constant(x)	(__bswap_constant_32(x))
97
#endif
102
#endif
98
103
104
#else 
105
106
/* mainly musl fallback */
107
108
#define	htons_constant(x)	(x)
109
#define	htonl_constant(x)	(x)
110
111
#endif
112
99
#define IN4_IS_ADDR_UNSPECIFIED(a) \
113
#define IN4_IS_ADDR_UNSPECIFIED(a) \
100
	((a)->s_addr == htonl(INADDR_ANY))
114
	((a)->s_addr == htonl(INADDR_ANY))
101
#define IN4_IS_ADDR_BROADCAST(a) \
115
#define IN4_IS_ADDR_BROADCAST(a) \

Return to bug 4