ports/net/dhcprelay/files/patch-dhcprelay.c
Thomas Zander d2ac5a2231 Fix runtime error: Packet type identification on big-endian
machines which prevented it from working correctly on e.g.
MIPS-based routers.

PR:		201382
Submitted by:	kp@freebsd.org
Approved by:	edwin@mavetju.org (maintainer)
MFH:		2015Q3
2015-07-16 14:52:11 +00:00

11 lines
313 B
C

--- dhcprelay.c.orig 2006-03-21 02:46:28 UTC
+++ dhcprelay.c
@@ -186,7 +186,7 @@ void pcap_callback(u_char *user, const s
printf(" %d",eh->ether_type);
}
// check for IPv4 packets
- if (eh->ether_type!=8) {
+ if (eh->ether_type != htons(0x800)) {
if (DEBUG>1) printf("\n");
return;
}