OpenOSPFD 4.3 is out, ftp://ftp.openbsd.org/pub/OpenBSD/OpenBGPD/openospfd-4.3.tgz Fix: The following patches update the port to 4.3 and fix some important problems, most notably -- libevent-related issue Remko Lodder was trouble with. Update to 4.3 itself: Add comments to all patches to give an idea why they are needed: From 6155fa523818154876ddae5c54da8e825cff0d82 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Date: Sun, 21 Dec 2008 16:31:31 +0300 Subject: [PATCH 2/3] net/openospfd: add comments to the FreeBSD patches for OpenOSPFD Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> --- net/openospfd/files/patch-ospfctl_parser.c | 6 ++++++ net/openospfd/files/patch-ospfctl_parser.h | 6 ++++++ net/openospfd/files/patch-ospfd_carp.c | 2 ++ net/openospfd/files/patch-ospfd_kroute.c | 9 +++++++++ net/openospfd/files/patch-ospfd_ospfd.c | 2 ++ net/openospfd/files/patch-ospfd_ospfd.h | 2 ++ net/openospfd/files/patch-ospfd_packet.c | 7 +++++++ net/openospfd/files/patch-ospfd_parse.y | 2 ++ 8 files changed, 36 insertions(+), 0 deletions(-) diff --git a/net/openospfd/files/patch-ospfctl_parser.c b/net/openospfd/files/patch-ospfctl_parser.c index ad85723..ddbf159 100644 --- a/net/openospfd/files/patch-ospfctl_parser.c +++ b/net/openospfd/files/patch-ospfctl_parser.c @@ -1,3 +1,9 @@ +Move 'struct token' and 'enum token_type' definitions from parser.c +to parser.h + +We need this because parser.h references 'struct token' and it is in turn +references 'enum token_type'. + --- ospfctl/parser.c.orig 2008-02-07 19:13:50.000000000 +0300 +++ ospfctl/parser.c 2008-02-07 19:15:47.000000000 +0300 @@ -32,23 +32,6 @@ diff --git a/net/openospfd/files/patch-ospfctl_parser.h b/net/openospfd/files/patch-ospfctl_parser.h index 677bee2..ad0aa42 100644 --- a/net/openospfd/files/patch-ospfctl_parser.h +++ b/net/openospfd/files/patch-ospfctl_parser.h @@ -1,3 +1,9 @@ +Move 'struct token' and 'enum token_type' definitions from parser.c +to parser.h + +We need this because parser.h references 'struct token' and it is in turn +references 'enum token_type'. + --- ospfctl/parser.h.orig 2008-02-07 19:12:58.000000000 +0300 +++ ospfctl/parser.h 2008-02-07 19:15:45.000000000 +0300 @@ -50,6 +50,16 @@ diff --git a/net/openospfd/files/patch-ospfd_carp.c b/net/openospfd/files/patch-ospfd_carp.c index 798643b..a4c66a5 100644 --- a/net/openospfd/files/patch-ospfd_carp.c +++ b/net/openospfd/files/patch-ospfd_carp.c @@ -1,3 +1,5 @@ +Disable CARP demotion support + --- ospfd/carp.c.orig 2008-02-07 18:26:32.000000000 +0300 +++ ospfd/carp.c 2008-02-07 18:39:58.000000000 +0300 @@ -29,6 +29,13 @@ diff --git a/net/openospfd/files/patch-ospfd_kroute.c b/net/openospfd/files/patch-ospfd_kroute.c index 2e270f4..b5f0d22 100644 --- a/net/openospfd/files/patch-ospfd_kroute.c +++ b/net/openospfd/files/patch-ospfd_kroute.c @@ -1,3 +1,12 @@ +Disable some stuff that is absent in FreeBSD + +- route labeling; +- multipath routing flag; +- multiple routing tables support. + +And use FreeBSD-specific names for route-related structures +instead of OpenBSD-specific ones. + --- ospfd/kroute.c.orig 2007-10-18 00:52:42.000000000 +0400 +++ ospfd/kroute.c 2008-12-19 18:07:06.000000000 +0300 @@ -1024,9 +1024,11 @@ diff --git a/net/openospfd/files/patch-ospfd_ospfd.c b/net/openospfd/files/patch-ospfd_ospfd.c index 419eb4f..58e7ddd 100644 --- a/net/openospfd/files/patch-ospfd_ospfd.c +++ b/net/openospfd/files/patch-ospfd_ospfd.c @@ -1,3 +1,5 @@ +Disable CARP demotion support + --- ospfd/ospfd.c.orig 2008-02-07 18:31:27.000000000 +0300 +++ ospfd/ospfd.c 2008-02-07 18:41:46.000000000 +0300 @@ -300,7 +300,9 @@ diff --git a/net/openospfd/files/patch-ospfd_ospfd.h b/net/openospfd/files/patch-ospfd_ospfd.h index bcd1f6d..363712d 100644 --- a/net/openospfd/files/patch-ospfd_ospfd.h +++ b/net/openospfd/files/patch-ospfd_ospfd.h @@ -1,3 +1,5 @@ +Define macro LINK_STATE_IS_UP + --- ospfd/ospfd.h.orig 2008-02-07 18:57:03.000000000 +0300 +++ ospfd/ospfd.h 2008-02-07 18:56:54.000000000 +0300 @@ -320,6 +320,10 @@ diff --git a/net/openospfd/files/patch-ospfd_packet.c b/net/openospfd/files/patch-ospfd_packet.c index cceb302..c490034 100644 --- a/net/openospfd/files/patch-ospfd_packet.c +++ b/net/openospfd/files/patch-ospfd_packet.c @@ -1,3 +1,10 @@ +Add some FreeBSD/NetBSD specifics + +- FreeBSD/NetBSD require IP packet length to be in the host's byte order; +- FreeBSD/NetBSD substracts IP header length from the packet length, + (see sys/netinet/ip_input.c, routine ip_input); OpenBSD wants to see + the unmodified length. + --- ospfd/packet.c.orig 2006-11-17 11:55:31.000000000 +0300 +++ ospfd/packet.c 2008-02-13 22:13:04.000000000 +0300 @@ -36,7 +36,7 @@ diff --git a/net/openospfd/files/patch-ospfd_parse.y b/net/openospfd/files/patch-ospfd_parse.y index 6c40c3e..7cf7fc2 100644 --- a/net/openospfd/files/patch-ospfd_parse.y +++ b/net/openospfd/files/patch-ospfd_parse.y @@ -1,3 +1,5 @@ +Disable CARP demotion support + --- ospfd/parse.y.orig 2008-02-26 13:09:58.000000000 +0300 +++ ospfd/parse.y 2008-12-19 17:52:39.000000000 +0300 @@ -503,6 +503,11 @@ -- 1.6.0.5 --- update-to-4.3-pack2.diff ends here --- Patch for libevent-related issue and fix for ARP-v2 stuff in 8-CURRENT: ARP-v2 is added here: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/route.h?rev=1.77 And ARP-v2 patch for OpenOSPFD was slightly discuissed here: http://lists.freebsd.org/pipermail/freebsd-current/2008-December/001447.html--yRtRyd5ia1SaUEXI2REX1jrPjDfZx57FbYFHlRebaHdy843i Content-Type: text/plain; name="update-to-4.3-pack1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="update-to-4.3-pack1.diff" From e2c61733ea1201a1709779aa26f2b243fa206a1d Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Date: Fri, 19 Dec 2008 18:30:30 +0300 Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> --- net/openospfd/Makefile | 6 +- net/openospfd/distinfo | 6 +- net/openospfd/files/patch-ospfd_kroute.c | 48 +++++++---- net/openospfd/files/patch-ospfd_parse.y | 16 ++-- net/openospfd/files/patch-ospfd_rde_spf.c | 133 ----------------------------- 5 files changed, 46 insertions(+), 163 deletions(-) delete mode 100644 net/openospfd/files/patch-ospfd_rde_spf.c diff --git a/net/openospfd/Makefile b/net/openospfd/Makefile index 512932c..56b919d 100644 --- a/net/openospfd/Makefile +++ b/net/openospfd/Makefile @@ -6,11 +6,11 @@ # PORTNAME= openospfd -PORTVERSION= 4.2 +PORTVERSION= 4.3 CATEGORIES= net -MASTER_SITES= ftp://ftp.dkuug.dk/pub/OpenBSD/OpenBGPD/:openbsd \ +MASTER_SITES= ${MASTER_SITE_OPENBSD:S/$/:openbsd/g} \ ${MASTER_SITE_LOCAL:S/$/:freebsd/g} -MASTER_SITE_SUBDIR= flz/openospfd/:freebsd +MASTER_SITE_SUBDIR= flz/openospfd/:freebsd OpenBGPD/:openbsd DISTFILES= ${PORTNAME}-${PORTVERSION}.tgz:openbsd \ if_media.h:freebsd hash.h:freebsd DIST_SUBDIR= ${PORTNAME} diff --git a/net/openospfd/distinfo b/net/openospfd/distinfo index 870d644..50f62f0 100644 --- a/net/openospfd/distinfo +++ b/net/openospfd/distinfo @@ -1,6 +1,6 @@ -MD5 (openospfd/openospfd-4.2.tgz) = ac919e4883105b28a846106e7c60bb80 -SHA256 (openospfd/openospfd-4.2.tgz) = 896a9e29447d7da46a1c7c1717e1527b3770425840e8f0180419ec313d3d7b00 -SIZE (openospfd/openospfd-4.2.tgz) = 93661 +MD5 (openospfd/openospfd-4.3.tgz) = dffeb5cf21cbd4f15534e658682cb6ee +SHA256 (openospfd/openospfd-4.3.tgz) = 8fd4ffb393cc06f5936e9eb444b54f72d3fb7ec27285d0d746de5e8050959a66 +SIZE (openospfd/openospfd-4.3.tgz) = 97515 MD5 (openospfd/if_media.h) = 4ff9297f5c133425dafe3ca565c0f811 SHA256 (openospfd/if_media.h) = 58225d0ed363c2beb23426f0f8254089d4541c3334776f3750ba434d4491a1d1 SIZE (openospfd/if_media.h) = 23762 diff --git a/net/openospfd/files/patch-ospfd_kroute.c b/net/openospfd/files/patch-ospfd_kroute.c index 2b1bd77..2e270f4 100644 --- a/net/openospfd/files/patch-ospfd_kroute.c +++ b/net/openospfd/files/patch-ospfd_kroute.c @@ -1,6 +1,6 @@ ---- ospfd/kroute.c.orig 2008-02-07 18:58:38.000000000 +0300 -+++ ospfd/kroute.c 2008-02-07 19:09:58.000000000 +0300 -@@ -955,9 +955,11 @@ +--- ospfd/kroute.c.orig 2007-10-18 00:52:42.000000000 +0400 ++++ ospfd/kroute.c 2008-12-19 18:07:06.000000000 +0300 +@@ -1024,9 +1024,11 @@ struct sockaddr_in prefix; struct sockaddr_in nexthop; struct sockaddr_in mask; @@ -13,7 +13,23 @@ if (kr_state.fib_sync == 0) return (0); -@@ -1011,6 +1013,7 @@ +@@ -1035,9 +1037,14 @@ + bzero(&hdr, sizeof(hdr)); + hdr.rtm_version = RTM_VERSION; + hdr.rtm_type = action; ++#if !defined(__FreeBSD__) + hdr.rtm_flags = RTF_PROTO2|RTF_MPATH; ++#else ++ /* No multipath routing in FreeBSD yet */ ++ hdr.rtm_flags = RTF_PROTO2; ++#endif /* !defined(__FreeBSD__) */ + if (action == RTM_CHANGE) /* force PROTO2 reset the other flags */ +- hdr.rtm_fmask = RTF_PROTO2|RTF_PROTO1|RTF_REJECT|RTF_BLACKHOLE; ++ hdr.rtm_use = RTF_PROTO2|RTF_PROTO1|RTF_REJECT|RTF_BLACKHOLE; + hdr.rtm_seq = kr_state.rtseq++; /* overflow doesn't matter */ + hdr.rtm_msglen = sizeof(hdr); + /* adjust iovec */ +@@ -1080,6 +1087,7 @@ iov[iovcnt].iov_base = &mask; iov[iovcnt++].iov_len = sizeof(mask); @@ -21,7 +37,7 @@ if (kroute->rtlabel != 0) { sa_rl.sr_len = sizeof(sa_rl); sa_rl.sr_family = AF_UNSPEC; -@@ -1027,6 +1030,7 @@ +@@ -1096,6 +1104,7 @@ iov[iovcnt].iov_base = &sa_rl; iov[iovcnt++].iov_len = sizeof(sa_rl); } @@ -29,7 +45,7 @@ retry: -@@ -1069,7 +1073,9 @@ +@@ -1138,7 +1147,9 @@ struct rt_msghdr *rtm; struct sockaddr *sa, *rti_info[RTAX_MAX]; struct sockaddr_in *sa_in; @@ -39,7 +55,7 @@ struct kroute_node *kr; mib[0] = CTL_NET; -@@ -1078,9 +1084,13 @@ +@@ -1147,9 +1158,13 @@ mib[3] = AF_INET; mib[4] = NET_RT_DUMP; mib[5] = 0; @@ -53,7 +69,7 @@ log_warn("sysctl"); return (-1); } -@@ -1098,7 +1098,11 @@ +@@ -1157,7 +1172,11 @@ log_warn("fetchtable"); return (-1); } @@ -65,7 +81,7 @@ log_warn("sysctl"); free(buf); return (-1); -@@ -1157,6 +1163,7 @@ +@@ -1228,6 +1247,7 @@ send_rtmsg(kr_state.fd, RTM_DELETE, &kr->r); free(kr); } else { @@ -73,7 +89,7 @@ if ((label = (struct sockaddr_rtlabel *) rti_info[RTAX_LABEL]) != NULL) { kr->r.rtlabel = -@@ -1164,6 +1171,7 @@ +@@ -1235,6 +1255,7 @@ kr->r.ext_tag = rtlabel_id2tag(kr->r.rtlabel); } @@ -81,7 +97,7 @@ kroute_insert(kr); } -@@ -1257,7 +1265,9 @@ +@@ -1328,7 +1349,9 @@ struct ifa_msghdr *ifam; struct sockaddr *sa, *rti_info[RTAX_MAX]; struct sockaddr_in *sa_in; @@ -91,7 +107,7 @@ struct kroute_node *kr, *okr; struct in_addr prefix, nexthop; u_int8_t prefixlen; -@@ -1289,8 +1299,10 @@ +@@ -1362,8 +1385,10 @@ sa = (struct sockaddr *)(rtm + 1); get_rtaddrs(rtm->rtm_addrs, sa, rti_info); @@ -102,7 +118,7 @@ if (rtm->rtm_pid == kr_state.pid) /* caused by us */ continue; -@@ -1385,6 +1397,7 @@ +@@ -1458,6 +1483,7 @@ rtlabel_unref(kr->r.rtlabel); kr->r.rtlabel = 0; kr->r.ext_tag = 0; @@ -110,7 +126,7 @@ if ((label = (struct sockaddr_rtlabel *) rti_info[RTAX_LABEL]) != NULL) { kr->r.rtlabel = -@@ -1392,6 +1405,7 @@ +@@ -1465,6 +1491,7 @@ kr->r.ext_tag = rtlabel_id2tag(kr->r.rtlabel); } @@ -118,7 +134,7 @@ if (kif_validate(kr->r.ifindex)) kr->r.flags &= ~F_DOWN; -@@ -1413,6 +1427,7 @@ +@@ -1486,6 +1513,7 @@ kr->r.flags = flags; kr->r.ifindex = ifindex; @@ -126,7 +142,7 @@ if ((label = (struct sockaddr_rtlabel *) rti_info[RTAX_LABEL]) != NULL) { kr->r.rtlabel = -@@ -1420,6 +1435,7 @@ +@@ -1493,6 +1521,7 @@ kr->r.ext_tag = rtlabel_id2tag(kr->r.rtlabel); } diff --git a/net/openospfd/files/patch-ospfd_parse.y b/net/openospfd/files/patch-ospfd_parse.y index 7023a9d..6c40c3e 100644 --- a/net/openospfd/files/patch-ospfd_parse.y +++ b/net/openospfd/files/patch-ospfd_parse.y @@ -1,6 +1,6 @@ ---- ospfd/parse.y.orig 2008-02-07 18:34:22.000000000 +0300 -+++ ospfd/parse.y 2008-02-07 18:37:46.000000000 +0300 -@@ -485,6 +485,11 @@ +--- ospfd/parse.y.orig 2008-02-26 13:09:58.000000000 +0300 ++++ ospfd/parse.y 2008-12-19 17:52:39.000000000 +0300 +@@ -503,6 +503,11 @@ areaoptsl : interface | DEMOTE STRING demotecount { @@ -9,10 +9,10 @@ + free($2); + YYERROR; +#else - if ($3 > 255) { - yyerror("demote count too big: max 255"); + if ($3 < 1 || $3 > 255) { + yyerror("demote count out of range (1-255)"); free($2); -@@ -505,6 +510,7 @@ +@@ -523,6 +528,7 @@ area->demote_group); YYERROR; } @@ -20,7 +20,7 @@ } | defaults ; -@@ -581,6 +587,11 @@ +@@ -599,6 +605,11 @@ interfaceoptsl : PASSIVE { iface->passive = 1; } | DEMOTE STRING { @@ -32,7 +32,7 @@ if (strlcpy(iface->demote_group, $2, sizeof(iface->demote_group)) >= sizeof(iface->demote_group)) { -@@ -595,6 +606,7 @@ +@@ -613,6 +624,7 @@ iface->demote_group); YYERROR; } diff --git a/net/openospfd/files/patch-ospfd_rde_spf.c b/net/openospfd/files/patch-ospfd_rde_spf.c deleted file mode 100644 index e0391f3..0000000 --- a/net/openospfd/files/patch-ospfd_rde_spf.c +++ /dev/null @@ -1,133 +0,0 @@ ---- ospfd/rde_spf.c 2007/08/06 11:32:34 1.63 -+++ ospfd/rde_spf.c 2007/09/16 15:00:11 1.64 -@@ -1,4 +1,4 @@ --/* $OpenBSD: rde_spf.c,v 1.63 2007/08/06 11:32:34 claudio Exp $ */ -+/* $OpenBSD: rde_spf.c,v 1.64 2007/09/16 15:00:11 claudio Exp $ */ - - /* - * Copyright (c) 2005 Esben Norby <norby@openbsd.org> -@@ -37,7 +37,8 @@ - - void calc_nexthop_clear(struct vertex *); - void calc_nexthop_add(struct vertex *, struct vertex *, u_int32_t); --void calc_nexthop(struct vertex *, struct vertex *); -+void calc_nexthop(struct vertex *, struct vertex *, -+ struct area *, struct lsa_rtr_link *); - void rt_nexthop_clear(struct rt_node *); - void rt_nexthop_add(struct rt_node *, struct v_nexthead *, - struct in_addr); -@@ -134,7 +135,7 @@ - if (d < w->cost) { - w->cost = d; - calc_nexthop_clear(w); -- calc_nexthop(w, v); -+ calc_nexthop(w, v, area, rtr_link); - /* - * need to readd to candidate list - * because the list is sorted -@@ -143,12 +144,12 @@ - cand_list_add(w); - } else - /* equal cost path */ -- calc_nexthop(w, v); -+ calc_nexthop(w, v, area, rtr_link); - } else if (w->cost == LS_INFINITY && d < LS_INFINITY) { - w->cost = d; - - calc_nexthop_clear(w); -- calc_nexthop(w, v); -+ calc_nexthop(w, v, area, rtr_link); - cand_list_add(w); - } - } -@@ -384,54 +385,51 @@ - } - - void --calc_nexthop(struct vertex *dst, struct vertex *parent) -+calc_nexthop(struct vertex *dst, struct vertex *parent, -+ struct area *area, struct lsa_rtr_link *rtr_link) - { -- struct lsa_rtr_link *rtr_link = NULL; - struct v_nexthop *vn; -+ struct iface *iface; - int i; - - /* case 1 */ - if (parent == spf_root) { - switch (dst->type) { - case LSA_TYPE_ROUTER: -- for (i = 0; i < lsa_num_links(dst); i++) { -- rtr_link = get_rtr_link(dst, i); -- if (rtr_link->type == LINK_TYPE_POINTTOPOINT && -- ntohl(rtr_link->id) == parent->ls_id) { -+ if (rtr_link->type != LINK_TYPE_POINTTOPOINT) -+ fatalx("inconsistent SPF tree"); -+ LIST_FOREACH(iface, &area->iface_list, entry) { -+ if (rtr_link->data == iface->addr.s_addr) { - calc_nexthop_add(dst, parent, -- rtr_link->data); -- break; -+ iface->dst.s_addr); -+ return; - } - } -- return; -+ fatalx("no interface found for interface"); - case LSA_TYPE_NETWORK: -- for (i = 0; i < lsa_num_links(parent); i++) { -- rtr_link = get_rtr_link(parent, i); -- switch (rtr_link->type) { -- case LINK_TYPE_POINTTOPOINT: -- /* ignore */ -- break; -- case LINK_TYPE_TRANSIT_NET: -- if ((htonl(dst->ls_id) & -- dst->lsa->data.net.mask) == -- (rtr_link->data & -- dst->lsa->data.net.mask)) { -- calc_nexthop_add(dst, parent, -- rtr_link->data); -- } -- break; -- case LINK_TYPE_STUB_NET: -- break; -- -- default: -- fatalx("calc_nexthop: invalid link " -- "type"); -+ switch (rtr_link->type) { -+ case LINK_TYPE_POINTTOPOINT: -+ case LINK_TYPE_STUB_NET: -+ /* ignore */ -+ break; -+ case LINK_TYPE_TRANSIT_NET: -+ if ((htonl(dst->ls_id) & -+ dst->lsa->data.net.mask) == -+ (rtr_link->data & -+ dst->lsa->data.net.mask)) { -+ calc_nexthop_add(dst, parent, -+ rtr_link->data); - } -+ break; -+ default: -+ fatalx("calc_nexthop: invalid link " -+ "type"); - } - return; - default: - fatalx("calc_nexthop: invalid dst type"); - } -+ return; - } - - /* case 2 */ -@@ -459,7 +457,7 @@ - - /* case 3 */ - TAILQ_FOREACH(vn, &parent->nexthop, entry) -- calc_nexthop_add(dst, parent, vn->nexthop.s_addr); -+ calc_nexthop_add(dst, parent, vn->nexthop.s_addr); - } - - /* candidate list */ -- 1.6.0.5 How-To-Repeat: Look at the above URL. Moreover, issue with libevent's processing in OpenOSPFD was found by Remko Lodder, the provided patchset fixes it as well.
Responsible Changed From-To: freebsd-ports-bugs->farrokhi Over to maintainer (via the GNATS Auto Assign Tool)
I have another patch that just cleans up some things: * FreeBSD now has <sys/hash.h>, so it is better to use the native one; * __dead2 macro is here and does the same thing as __dead for OpenBSD; * kroute.c needs no substitutions -- we have them in the patch. These fixes are mostly cosmetic ones, but I feel that is right to include them to the port. --- update-to-4.3-pack4.diff begins here --- =46rom a4365e162d129f7111895ce75b50fe41e949752d Mon Sep 17 00:00:00 2001 =46rom: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Date: Wed, 24 Dec 2008 00:14:37 +0300 Subject: [PATCH 4/4] net/openospfd: clean up some FreeBSD-specific stuff - FreeBSD has __dead2 macro instead of __dead one, so there is no point in wiping '__dead' completely. __dead2 is here at least since RELENG_4, so we seem to be safe here. - FreeBSD has sys/hash.h since FreeBSD 6.x, so it will be better to use local version. Just now it coincides with one that was exported by flz@. - Remove sed construct for kroute.c -- we have a patch for this. Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> --- net/openospfd/Makefile | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/net/openospfd/Makefile b/net/openospfd/Makefile index 56b919d..695c095 100644 --- a/net/openospfd/Makefile +++ b/net/openospfd/Makefile @@ -12,7 +12,7 @@ MASTER_SITES=3D ${MASTER_SITE_OPENBSD:S/$/:openbsd/g} \ ${MASTER_SITE_LOCAL:S/$/:freebsd/g} MASTER_SITE_SUBDIR=3D flz/openospfd/:freebsd OpenBGPD/:openbsd DISTFILES=3D ${PORTNAME}-${PORTVERSION}.tgz:openbsd \ - if_media.h:freebsd hash.h:freebsd + if_media.h:freebsd DIST_SUBDIR=3D ${PORTNAME} EXTRACT_ONLY=3D ${PORTNAME}-${PORTVERSION}.tgz =20 @@ -23,6 +23,13 @@ LIB_DEPENDS=3D event-1.4:${PORTSDIR}/devel/libevent =20 CONFLICTS=3D zebra-0* quagga-0* =20 +.include <bsd.port.pre.mk> + +HASH_H!=3D ${TEST} -f /usr/include/sys/hash.h > /dev/null 2>&1 && ${ECHO} = yes || ${TRUE} +.if ${HASH_H} !=3D yes +DISTFILES+=3D hash.h:freebsd +.endif + WRKSRC=3D ${WRKDIR} MANCOMPRESSED=3D yes USE_RC_SUBR=3D openospfd.sh @@ -43,19 +50,22 @@ SUBDIRS=3D ospfd \ =20 post-extract: @${CP} ${DISTDIR}/${DIST_SUBDIR}/if_media.h ${WRKSRC}/ospfctl/ +.if ${HASH_H} !=3D yes @${CP} ${DISTDIR}/${DIST_SUBDIR}/hash.h ${WRKSRC}/ospfd/ +.endif =20 post-patch: +.if ${HASH_H} !=3D yes @${REINPLACE_CMD} -e "s|sys/hash.h|hash.h|" ${WRKSRC}/ospfd/lsupdate.c +.endif @${REINPLACE_CMD} -e "s|<net/if_media.h>|\"if_media.h\"|" ${WRKSRC}/ospfc= tl/ospfctl.c - @${REINPLACE_CMD} -e "s|rtm_fmask|rtm_use|" ${WRKSRC}/ospfd/kroute.c @${REINPLACE_CMD} -e "/rc.conf.local/d" ${WRKSRC}/ospfd/ospfd.conf.5 @${REINPLACE_CMD} -e "s|SIMPLEQ|STAILQ|" ${WRKSRC}/ospfd/*.[chy] @${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" \ ${WRKSRC}/ospfd/ospfd.h \ ${WRKSRC}/ospfd/ospfd.8 \ ${WRKSRC}/ospfd/ospfd.conf.5 - @${REINPLACE_CMD} -e "s|__dead||" \ + @${REINPLACE_CMD} -e "s|__dead|__dead2|" \ ${WRKSRC}/ospfd/log.h \ ${WRKSRC}/ospfd/ospfd.c \ ${WRKSRC}/ospfctl/ospfctl.c @@ -73,4 +83,4 @@ do-install: post-install: @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL =20 -.include <bsd.port.mk> +.include <bsd.port.post.mk> --=20 1.6.0.5 --- update-to-4.3-pack4.diff ends here --- --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #
Hi Patch from Eygene works in my test environment. An "old bug" seems still to exist: If I take down an interface with "ifconfig xxx down" and later up again, this connection will stay in EXSTART and never come up again (restart of openospfd does not help, reboot required). From my point of view, you can submit this patch to the tree. Regards, Reto
Reto, good day. Tue, Dec 30, 2008 at 10:36:02PM +0100, Reto Burkhalter wrote: > Patch from Eygene works in my test environment. Thanks for you confirmation! > An "old bug" seems still to exist: If I take down an interface with > "ifconfig xxx down" and later up again, this connection will stay in > EXSTART and never come up again (restart of openospfd does not help, > reboot required). I will try to reproduce it and, probably, will be able to fix this. What sort of interfaces (Ethernet, tun, etc) are you using or it does not matter (I hadn't tried to reproduce it yet). If you have the PR for it, please, point me to it. If there is no PR, could you, please, submit new one to make sure that the problem won't be lost. Thanks again and happy New Year! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #
Responsible Changed From-To: farrokhi->freebsd-ports-bugs maintainer was resetet.
Responsible Changed From-To: freebsd-ports-bugs->wxs I'll take it.
The maintainer on this port was reset. Since it seems to be fairly widely used I'd feel more comfortable making these changes knowing that someone is willing to work to resolve any issues with the port. Would you be willing to maintain this port? I'll do my best to get your work into the tree. -- WXS
Wesley, good day. Wed, Apr 22, 2009 at 05:24:58PM -0400, Wesley Shields wrote: > The maintainer on this port was reset. Since it seems to be fairly > widely used I'd feel more comfortable making these changes knowing that > someone is willing to work to resolve any issues with the port. Would > you be willing to maintain this port? I'll do my best to get your work > into the tree. Yes, I'll be happy to maintain it. Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #
Since there were a couple of patches in this PR I want to make sure I got them all and things look correct before I commit. I've attached the patch I intend to commit, which has some changes from yours: It removes the HAS_HASH pieces of your patch since all supported versions of FreeBSD have sys/hash.h. This has the added benefit of removing the nasty != assignment. The comments as to why the patches exist should be put in the CVS logs, not in the patches themselves. The change to ospfd/kroute.c to use rtm_use instead of rtm_fmask broke the build on -CURRENT. I've removed that and now builds correctly on -CURRENT, 6-STABLE and 7-STABLE. Can you please double check that these are the correct changes and let me know. I'm ready to commit but I want to make sure I get the correct set of changes in. -- WXS
wxs 2009-05-10 15:41:01 UTC FreeBSD ports repository Modified files: net/openospfd Makefile distinfo net/openospfd/files patch-ospfd_kroute.c patch-ospfd_parse.y Added files: net/openospfd/files patch-RTF_LLINFO-ARP-v2-fix patch-fix-libevent-READ-WRITE Removed files: net/openospfd/files patch-ospfd_rde_spf.c Log: - Update to 4.3. - Remove unnecessary hash.h stuff. - Pass maintainer to submitter. PR: ports/129881 Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Revision Changes Path 1.15 +6 -8 ports/net/openospfd/Makefile 1.6 +3 -6 ports/net/openospfd/distinfo 1.1 +26 -0 ports/net/openospfd/files/patch-RTF_LLINFO-ARP-v2-fix (new) 1.1 +271 -0 ports/net/openospfd/files/patch-fix-libevent-READ-WRITE (new) 1.3 +29 -16 ports/net/openospfd/files/patch-ospfd_kroute.c 1.2 +8 -8 ports/net/openospfd/files/patch-ospfd_parse.y 1.2 +0 -133 ports/net/openospfd/files/patch-ospfd_rde_spf.c (dead) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!