Do not ask too much to macosx

This commit is contained in:
angt
2015-12-12 13:30:27 +01:00
parent 05de7b8109
commit da30c9110a

View File

@@ -514,7 +514,7 @@ static void gt_print_hdr (uint8_t *data, size_t ip_size, const char *sockname)
if (ip_hdr_size<=0) if (ip_hdr_size<=0)
return; return;
if (ip_proto==SOL_TCP) { if (ip_proto==6) {
struct tcphdr tcp; struct tcphdr tcp;
byte_cpy(&tcp, &data[ip_hdr_size], sizeof(tcp)); byte_cpy(&tcp, &data[ip_hdr_size], sizeof(tcp));
@@ -535,7 +535,7 @@ static void gt_print_hdr (uint8_t *data, size_t ip_size, const char *sockname)
(tcp.th_flags&TH_URG) ?'U':'.'); (tcp.th_flags&TH_URG) ?'U':'.');
} }
if (ip_proto==SOL_UDP) { if (ip_proto==17) {
struct udphdr udp; struct udphdr udp;
byte_cpy(&udp, &data[ip_hdr_size], sizeof(udp)); byte_cpy(&udp, &data[ip_hdr_size], sizeof(udp));