summaryrefslogtreecommitdiff
path: root/net/openospfd-devel/files
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2006-03-20 10:41:04 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2006-03-20 10:41:04 +0000
commit4285b394ae59868863a8c6886338a4c2da741fdf (patch)
tree9d6d07a1cd7309f527e036a1096224781b046a75 /net/openospfd-devel/files
parentRemove mirrors.rcn.net, it seems to have disappeared. (diff)
- Add openospfd-devel, a free implementation of the Open Shortest Path First
routing protocol.
Diffstat (limited to 'net/openospfd-devel/files')
-rw-r--r--net/openospfd-devel/files/openospfd.sh.in31
-rw-r--r--net/openospfd-devel/files/patch-ospfd_packet.c26
2 files changed, 57 insertions, 0 deletions
diff --git a/net/openospfd-devel/files/openospfd.sh.in b/net/openospfd-devel/files/openospfd.sh.in
new file mode 100644
index 000000000000..47240e48f699
--- /dev/null
+++ b/net/openospfd-devel/files/openospfd.sh.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/openospfd-devel/files/Attic/openospfd.sh.in,v 1.1 2006-03-20 10:41:04 flz Exp $
+#
+
+# PROVIDE: ospfd
+# REQUIRE: LOGIN abi
+# BEFORE: securelevel
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `openospfd':
+#
+# openospfd_enable="YES"
+#
+# See ospfd(8) for openospfd_flags
+#
+
+. "%%RC_SUBR%%"
+
+name="openospfd"
+rcvar=`set_rcvar`
+
+extra_commands="reload"
+command="%%PREFIX%%/sbin/ospfd"
+required_files="%%PREFIX%%/etc/ospfd.conf"
+
+load_rc_config "$name"
+: ${openospfd_enable="NO"}
+: ${openospfd_flags=""}
+
+run_rc_command "$1"
diff --git a/net/openospfd-devel/files/patch-ospfd_packet.c b/net/openospfd-devel/files/patch-ospfd_packet.c
new file mode 100644
index 000000000000..414554a9a169
--- /dev/null
+++ b/net/openospfd-devel/files/patch-ospfd_packet.c
@@ -0,0 +1,26 @@
+--- ospfd/packet.c.orig 9 Mar 2006 13:31:57 -0000 1.20
++++ ospfd/packet.c 16 Mar 2006 18:21:38 -0000
+@@ -34,7 +34,7 @@
+ #include "log.h"
+ #include "ospfe.h"
+
+-int ip_hdr_sanity_check(const struct ip *, u_int16_t);
++int ip_hdr_sanity_check(struct ip *, u_int16_t);
+ int ospf_hdr_sanity_check(const struct ip *,
+ struct ospf_hdr *, u_int16_t, const struct iface *);
+ struct iface *find_iface(struct ospfd_conf *, struct in_addr);
+@@ -196,8 +196,13 @@ recv_packet(int fd, short event, void *b
+ }
+
+ int
+-ip_hdr_sanity_check(const struct ip *ip_hdr, u_int16_t len)
++ip_hdr_sanity_check(struct ip *ip_hdr, u_int16_t len)
+ {
++#if defined(__NetBSD__) || defined(__FreeBSD__)
++ /* FreeBSD and NetBSD modify the IP header. Undo it! */
++ ip_hdr->ip_len = htons(ip_hdr->ip_len + (ip_hdr->ip_hl << 2));
++#endif
++
+ if (ntohs(ip_hdr->ip_len) != len) {
+ log_debug("recv_packet: invalid IP packet length %u",
+ ntohs(ip_hdr->ip_len));