summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2003-12-08 10:34:54 +0000
committerpaul <paul>2003-12-08 10:34:54 +0000
commit239aecc01cd8ef389b3684cff6ba372da51826ff (patch)
treec815548ac76ae3dc86048431915e7a85f400d288
parent29226d4ad5169529ad8f2f6e32e47160d43b1565 (diff)
2003-12-08 Mattias Amnefelt <mattiasa@kth.se?
* ospf_packet.c: (ospf_recv_packet) OpenBSD now leaves iph.ip_len network byte order. (bugzilla #67).
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_packet.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index d294a220..bc17a605 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-08 Mattias Amnefelt <mattiasa@kth.se?
+
+ * ospf_packet.c: (ospf_recv_packet) OpenBSD now leaves iph.ip_len
+ network byte order.
+
2003-12-05 Greg Troxel <gdt@poblano.ir.bbn.com>
* ospfd.c (ospf_network_match_iface): Rewrite code for clarity
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index d7337c19..86ed3878 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -1936,13 +1936,13 @@ ospf_recv_packet (int fd, struct interface **ifp)
return NULL;
}
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || (defined(__OpenBSD__) && (OpenBSD < 200311))
ip_len = iph.ip_len;
#else
ip_len = ntohs (iph.ip_len);
#endif
-#if !defined(GNU_LINUX)
+#if !defined(GNU_LINUX) && (OpenBSD < 200311)
/*
* Kernel network code touches incoming IP header parameters,
* before protocol specific processing.