-/* $OpenBSD: ip_ether.c,v 1.66 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.67 2014/07/14 12:18:30 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
*
/* Verify EtherIP version number */
m_copydata(m, iphlen, sizeof(struct etherip_header), (caddr_t)&eip);
- if (eip.eip_ver == ETHERIP_VERSION && eip.eip_oldver == 0) {
+ if (eip.eip_ver == ETHERIP_VERSION) {
/* Correct */
- } else if (eip.eip_oldver == ETHERIP_VERSION && eip.eip_ver == 0) {
- /*
- * OpenBSD developers convinced IETF folk to create a
- * "version 3" protocol which would solve a byte order
- * problem -- our discussion placed "3" into the first byte.
- * They knew we were starting to deploy this. When IETF
- * published the standard this had changed to a nibble...
- * but they failed to inform us. Awesome.
- *
- * For backwards compat, for a while, we must accept either.
- */
} else {
DPRINTF(("etherip_input(): received EtherIP version number "
"%d not suppoorted\n", eip.eip_ver));
* We will transition step by step to the new model.
*/
eip.eip_ver = ETHERIP_VERSION;
- eip.eip_oldver = 0;
+ eip.eip_res = 0;
eip.eip_pad = 0;
m_copyback(m, hlen - sizeof(struct etherip_header),
sizeof(struct etherip_header), &eip, M_NOWAIT);
-/* $OpenBSD: ip_ether.h,v 1.17 2013/01/14 23:06:10 deraadt Exp $ */
+/* $OpenBSD: ip_ether.h,v 1.18 2014/07/14 12:18:30 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@adk.gr)
*
struct etherip_header {
#if BYTE_ORDER == LITTLE_ENDIAN
- u_int eip_oldver:4; /* reserved */
+ u_int eip_res:4; /* reserved */
u_int eip_ver:4; /* version */
#endif
#if BYTE_ORDER == BIG_ENDIAN
u_int eip_ver:4; /* version */
- u_int eip_oldver:4; /* reserved */
+ u_int eip_res:4; /* reserved */
#endif
u_int8_t eip_pad; /* required padding byte */
} __packed;