diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2014-02-26 21:54:59 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2014-02-26 21:54:59 +0000 |
commit | 54dc2eefdab938ae2b410e756853cd13e4aaf074 (patch) | |
tree | 962ae154fb3cfc79c860e04a7f680db1f8814018 /net/xorp/files | |
parent | - mark forbidden if build with Apache modules (not the default) (diff) |
- Update to 1.8.5
- Unbreak and unexpire
- Stage support
PR: ports/186982
Submitted by: Johannes 5 Joemann
Notes
Notes:
svn path=/head/; revision=346231
Diffstat (limited to 'net/xorp/files')
59 files changed, 1125 insertions, 141 deletions
diff --git a/net/xorp/files/patch-SConstruct b/net/xorp/files/patch-SConstruct new file mode 100644 index 000000000000..826dc700564d --- /dev/null +++ b/net/xorp/files/patch-SConstruct @@ -0,0 +1,27 @@ +--- ./SConstruct.orig 2012-01-11 17:46:45.000000000 +0000 ++++ ./SConstruct 2014-02-26 21:17:13.000000000 +0000 +@@ -162,22 +162,13 @@ + + # XXX TODO: Make initial CPPPATH/LIBPATH derive from + # autodetected host system *or* command line. +-#env = Environment( +-# TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen', +-# 'TOOL_SUBST'], +-# ENV = os.environ, +-# BUILDDIR = builddir, +-# CPPPATH=['/usr/local/include', '$BUILDDIR'], +-# LIBPATH=['usr/lib', '/usr/local/lib'], +-# variables = vars) +- + env = Environment( + TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen', + 'TOOL_SUBST'], + ENV = os.environ, + BUILDDIR = builddir, +- CPPPATH=['$BUILDDIR'], +- LIBPATH=['usr/lib'], ++ CPPPATH=['%%LOCALBASE%%/include', '$BUILDDIR'], ++ LIBPATH=['usr/lib', '%%LOCALBASE%%/lib'], + variables = vars) + + prefix = env['prefix'] diff --git a/net/xorp/files/patch-bgp__bgp_trie.cc b/net/xorp/files/patch-bgp__bgp_trie.cc new file mode 100644 index 000000000000..497a35b74d56 --- /dev/null +++ b/net/xorp/files/patch-bgp__bgp_trie.cc @@ -0,0 +1,11 @@ +--- ./bgp/bgp_trie.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./bgp/bgp_trie.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -115,7 +115,7 @@ + net.str().c_str(), + found->attributes()->str().c_str()); + XLOG_INFO("Pathmap dump follows: \n"); +- for (pmi == _pathmap.begin(); pmi != _pathmap.end(); pmi++) { ++ for (pmi = _pathmap.begin(); pmi != _pathmap.end(); pmi++) { + XLOG_INFO("%s\n\n", pmi->second->str().c_str()); + } + XLOG_FATAL("Exiting\n"); diff --git a/net/xorp/files/patch-bgp__harness__coord.hh b/net/xorp/files/patch-bgp__harness__coord.hh new file mode 100644 index 000000000000..4ab42daa0707 --- /dev/null +++ b/net/xorp/files/patch-bgp__harness__coord.hh @@ -0,0 +1,12 @@ +--- ./bgp/harness/coord.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./bgp/harness/coord.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -42,7 +42,9 @@ + + private: + bool _done; ++public: + EventLoop& _eventloop; ++private: + Command& _command; + }; + diff --git a/net/xorp/files/patch-bgp__path_attribute.cc b/net/xorp/files/patch-bgp__path_attribute.cc new file mode 100644 index 000000000000..29befee38051 --- /dev/null +++ b/net/xorp/files/patch-bgp__path_attribute.cc @@ -0,0 +1,16 @@ +--- ./bgp/path_attribute.cc.orig 2011-03-16 21:15:59.000000000 +0000 ++++ ./bgp/path_attribute.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -830,8 +830,11 @@ + ClusterListAttribute::clone() const + { + ClusterListAttribute *ca = new ClusterListAttribute(); +- list<IPv4>::const_reverse_iterator i = cluster_list().rbegin(); +- for(; i != cluster_list().rend(); i++) ++ // list<IPv4>::const_reverse_iterator i = cluster_list().rbegin(); ++ list<IPv4>::const_iterator i = cluster_list().end(); ++ if (! cluster_list().empty()) ++ // for(; i != cluster_list().rend(); i++) ++ for(; i-- != cluster_list().begin(); ) + ca->prepend_cluster_id(*i); + return ca; + } diff --git a/net/xorp/files/patch-cli__cli_client.cc b/net/xorp/files/patch-cli__cli_client.cc new file mode 100644 index 000000000000..fe353a1e5c07 --- /dev/null +++ b/net/xorp/files/patch-cli__cli_client.cc @@ -0,0 +1,29 @@ +--- ./cli/cli_client.cc.orig 2011-07-25 17:45:38.000000000 +0000 ++++ ./cli/cli_client.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -832,7 +832,7 @@ + // + // Print help + // +- if ((val == 'h')) { ++ if (val == 'h') { + if (! is_help_mode()) { + set_help_mode(true); + _is_page_buffer_mode = &_is_help_buffer_mode; +@@ -958,7 +958,7 @@ + // Display the output all at once instead of oen screen at a time. + // (Same as specifying the "| no-more" command.) + // +- if ((val == 'N')) { ++ if (val == 'N') { + while (page_buffer_last_line_n() < page_buffer_lines_n()) { + set_page_buffer_mode(false); + cli_print(page_buffer_line(page_buffer_last_line_n())); +@@ -1021,7 +1021,7 @@ + // + // Redraw the output of the screen + // +- if ((val == CHAR_TO_CTRL('l'))) { ++ if (val == CHAR_TO_CTRL('l')) { + redisplay_screen_label: + size_t i, start_window_line = 0; + set_page_buffer_mode(false); diff --git a/net/xorp/files/patch-cli__xrl_cli_node.hh b/net/xorp/files/patch-cli__xrl_cli_node.hh new file mode 100644 index 000000000000..037fc743dba3 --- /dev/null +++ b/net/xorp/files/patch-cli__xrl_cli_node.hh @@ -0,0 +1,21 @@ +--- ./cli/xrl_cli_node.hh.orig 2011-03-16 21:27:45.000000000 +0000 ++++ ./cli/xrl_cli_node.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -224,6 +224,9 @@ + const string *cli_term_name, + const uint32_t *cli_session_id, + const string *command_output); ++ ++ EventLoop& _eventloop; ++ + private: + /** + * Called when Finder connection is established. +@@ -241,7 +244,7 @@ + + CliNode& cli_node() const { return (_cli_node); } + +- EventLoop& _eventloop; ++ // EventLoop& _eventloop; + CliNode& _cli_node; + + XrlCliProcessorV0p1Client _xrl_cli_processor_client; diff --git a/net/xorp/files/patch-contrib__olsr__face.hh b/net/xorp/files/patch-contrib__olsr__face.hh new file mode 100644 index 000000000000..39f7c0ca4433 --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__face.hh @@ -0,0 +1,14 @@ +--- ./contrib/olsr/face.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./contrib/olsr/face.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -291,8 +291,10 @@ + */ + void originate_hello(); + +- private: + Olsr& _olsr; ++ ++ private: ++ // Olsr& _olsr; + FaceManager& _fm; + Neighborhood* _nh; + MessageDecoder& _md; diff --git a/net/xorp/files/patch-contrib__olsr__face_manager.cc b/net/xorp/files/patch-contrib__olsr__face_manager.cc new file mode 100644 index 000000000000..aca6762e7dcb --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__face_manager.cc @@ -0,0 +1,16 @@ +--- ./contrib/olsr/face_manager.cc.orig 2011-07-25 17:55:36.000000000 +0000 ++++ ./contrib/olsr/face_manager.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -239,8 +239,11 @@ + + // Walk the list of message handler functions in reverse, + // looking for one which is willing to consume this message. +- vector<MessageReceiveCB>::reverse_iterator jj; +- for (jj = _handlers.rbegin(); jj != _handlers.rend(); jj++) { ++ // vector<MessageReceiveCB>::reverse_iterator jj; ++ vector<MessageReceiveCB>::iterator jj; ++ if (! _handlers.empty()) ++ // for (jj = _handlers.rbegin(); jj != _handlers.rend(); jj++) { ++ for (jj = _handlers.end(); jj-- != _handlers.begin(); ) { + try { + is_consumed = (*jj)->dispatch(msg, src, face->local_addr()); + if (is_consumed) diff --git a/net/xorp/files/patch-contrib__olsr__message.hh b/net/xorp/files/patch-contrib__olsr__message.hh new file mode 100644 index 000000000000..0c4c4be3bccb --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__message.hh @@ -0,0 +1,13 @@ +--- ./contrib/olsr/message.hh.orig 2012-01-11 17:46:45.000000000 +0000 ++++ ./contrib/olsr/message.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -668,8 +668,8 @@ + return (str += '\n'); + } + +-private: +- size_t _opaque_data_offset; ++// private: ++// size_t _opaque_data_offset; + }; + + /** diff --git a/net/xorp/files/patch-contrib__olsr__policy_varrw.cc b/net/xorp/files/patch-contrib__olsr__policy_varrw.cc new file mode 100644 index 000000000000..e50ee991f7c4 --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__policy_varrw.cc @@ -0,0 +1,11 @@ +--- ./contrib/olsr/policy_varrw.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./contrib/olsr/policy_varrw.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -39,7 +39,7 @@ + #include "policy_varrw.hh" + + OlsrVarRW::OlsrVarRW(IPv4Net& network, IPv4& nexthop, uint32_t& metric, +- IPv4& originator, IPv4& main_addr, uint32_t vtype, ++ IPv4& originator, IPv4& main_addr, uint32_t& vtype, + PolicyTags& policytags) + : _network(network), _nexthop(nexthop), _metric(metric), + _originator(originator), _main_addr(main_addr), _vtype(vtype), diff --git a/net/xorp/files/patch-contrib__olsr__policy_varrw.hh b/net/xorp/files/patch-contrib__olsr__policy_varrw.hh new file mode 100644 index 000000000000..bb2d97086d34 --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__policy_varrw.hh @@ -0,0 +1,11 @@ +--- ./contrib/olsr/policy_varrw.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./contrib/olsr/policy_varrw.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -45,7 +45,7 @@ + }; + + OlsrVarRW(IPv4Net& network, IPv4& nexthop, uint32_t& metric, +- IPv4& originator, IPv4& main_addr, uint32_t vtype, ++ IPv4& originator, IPv4& main_addr, uint32_t& vtype, + PolicyTags& policytags); + + // SingleVarRW inteface: diff --git a/net/xorp/files/patch-contrib__olsr__tools__print_databases.cc b/net/xorp/files/patch-contrib__olsr__tools__print_databases.cc new file mode 100644 index 000000000000..6b6c3108e72f --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__tools__print_databases.cc @@ -0,0 +1,170 @@ +--- ./contrib/olsr/tools/print_databases.cc.orig 2011-03-16 21:16:01.000000000 +0000 ++++ ./contrib/olsr/tools/print_databases.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -161,7 +161,8 @@ + }; + + void +-GetExternals::get(int argc, char *argv[]) ++// GetExternals::get(int argc, char *argv[]) ++GetExternals::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -172,8 +173,8 @@ + if (! success) + XLOG_WARNING("Failed to get external route list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -309,7 +310,8 @@ + }; + + void +-GetInterfaces::get(int argc, char *argv[]) ++// GetInterfaces::get(int argc, char *argv[]) ++GetInterfaces::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -320,8 +322,8 @@ + if (! success) + XLOG_WARNING("Failed to get interface list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -476,7 +478,8 @@ + }; + + void +-GetLinks::get(int argc, char *argv[]) ++// GetLinks::get(int argc, char *argv[]) ++GetLinks::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -487,8 +490,8 @@ + if (! success) + XLOG_WARNING("Failed to get link list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -649,7 +652,8 @@ + }; + + void +-GetMids::get(int argc, char *argv[]) ++// GetMids::get(int argc, char *argv[]) ++GetMids::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -660,8 +664,8 @@ + if (! success) + XLOG_WARNING("Failed to get MID list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -803,7 +807,8 @@ + }; + + void +-GetNeighbors::get(int argc, char *argv[]) ++// GetNeighbors::get(int argc, char *argv[]) ++GetNeighbors::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -814,8 +819,8 @@ + if (! success) + XLOG_WARNING("Failed to get neighbor list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -979,7 +984,8 @@ + }; + + void +-GetTopology::get(int argc, char *argv[]) ++// GetTopology::get(int argc, char *argv[]) ++GetTopology::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -990,8 +996,8 @@ + if (! success) + XLOG_WARNING("Failed to get topology list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -1126,7 +1132,8 @@ + }; + + void +-GetTwohopLinks::get(int argc, char *argv[]) ++// GetTwohopLinks::get(int argc, char *argv[]) ++GetTwohopLinks::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -1137,8 +1144,8 @@ + if (! success) + XLOG_WARNING("Failed to get neighbor list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void +@@ -1271,7 +1278,8 @@ + }; + + void +-GetTwohopNeighbors::get(int argc, char *argv[]) ++// GetTwohopNeighbors::get(int argc, char *argv[]) ++GetTwohopNeighbors::get(int, char *[]) + { + XrlOlsr4V0p1Client cl(&this->_xr); + +@@ -1283,8 +1291,8 @@ + if (! success) + XLOG_WARNING("Failed to get two-hop neighbor list."); + +- UNUSED(argc); +- UNUSED(argv); ++ // UNUSED(argc); ++ // UNUSED(argv); + } + + void diff --git a/net/xorp/files/patch-contrib__olsr__twohop.hh b/net/xorp/files/patch-contrib__olsr__twohop.hh new file mode 100644 index 000000000000..3cd7f7d3e54b --- /dev/null +++ b/net/xorp/files/patch-contrib__olsr__twohop.hh @@ -0,0 +1,14 @@ +--- ./contrib/olsr/twohop.hh.orig 2011-03-16 21:27:46.000000000 +0000 ++++ ./contrib/olsr/twohop.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -140,8 +140,10 @@ + return _twohop_links; + } + +- private: + EventLoop& _ev; ++ ++ private: ++ // EventLoop& _ev; + Neighborhood* _parent; + + /** diff --git a/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.cc b/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.cc new file mode 100644 index 000000000000..0b1ba899b615 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.cc @@ -0,0 +1,14 @@ +--- ./fea/data_plane/control_socket/routing_socket.cc.orig 2011-03-16 21:27:46.000000000 +0000 ++++ ./fea/data_plane/control_socket/routing_socket.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -240,9 +240,10 @@ + // Observe routing sockets activity + // + +-struct RoutingSocketPlumber { ++class RoutingSocketPlumber { + typedef RoutingSocket::ObserverList ObserverList; + ++public: + static void + plumb(RoutingSocket& r, RoutingSocketObserver* o) + { diff --git a/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.hh b/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.hh new file mode 100644 index 000000000000..bca087856f93 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__control_socket__routing_socket.hh @@ -0,0 +1,11 @@ +--- ./fea/data_plane/control_socket/routing_socket.hh.orig 2011-03-16 21:27:46.000000000 +0000 ++++ ./fea/data_plane/control_socket/routing_socket.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -31,7 +31,7 @@ + + + class RoutingSocketObserver; +-struct RoutingSocketPlumber; ++// struct RoutingSocketPlumber; + + /** + * RoutingSocket class opens a routing socket and forwards data arriving diff --git a/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.cc b/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.cc new file mode 100644 index 000000000000..e8f24eda5e5e --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.cc @@ -0,0 +1,14 @@ +--- ./fea/data_plane/control_socket/windows_rtm_pipe.cc.orig 2011-03-16 21:16:01.000000000 +0000 ++++ ./fea/data_plane/control_socket/windows_rtm_pipe.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -288,9 +288,10 @@ + // Observe routing sockets activity + // + +-struct WinRtmPipePlumber { ++class WinRtmPipePlumber { + typedef WinRtmPipe::ObserverList ObserverList; + ++public: + static void + plumb(WinRtmPipe& r, WinRtmPipeObserver* o) + { diff --git a/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.hh b/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.hh new file mode 100644 index 000000000000..ef55480c5939 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__control_socket__windows_rtm_pipe.hh @@ -0,0 +1,11 @@ +--- ./fea/data_plane/control_socket/windows_rtm_pipe.hh.orig 2011-03-16 21:16:01.000000000 +0000 ++++ ./fea/data_plane/control_socket/windows_rtm_pipe.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -29,7 +29,7 @@ + #include "libxorp/exceptions.hh" + + class WinRtmPipeObserver; +-struct WinRtmPipePlumber; ++// struct WinRtmPipePlumber; + + /** + * WinRtmPipe class opens a routing socket and forwards data arriving diff --git a/net/xorp/files/patch-fea__data_plane__fibconfig__fibconfig_table_observer_rtmv2.hh b/net/xorp/files/patch-fea__data_plane__fibconfig__fibconfig_table_observer_rtmv2.hh new file mode 100644 index 000000000000..e05a1fb957d5 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__fibconfig__fibconfig_table_observer_rtmv2.hh @@ -0,0 +1,21 @@ +--- ./fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.hh.orig 2011-03-16 21:16:02.000000000 +0000 ++++ ./fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -73,15 +73,15 @@ + private: + class RtmV2Observer : public WinRtmPipeObserver { + public: +- RtmV2Observer(WinRtmPipe& rs, int af, ++ RtmV2Observer(WinRtmPipe& rs, /* int af, */ + FibConfigTableObserverRtmV2& rtmo) +- : WinRtmPipeObserver(rs), _af(af), _rtmo(rtmo) {} ++ : WinRtmPipeObserver(rs), /* _af(af), */ _rtmo(rtmo) {} + virtual ~RtmV2Observer() {} + void routing_socket_data(const vector<uint8_t>& buffer) { + _rtmo.receive_data(buffer); + } + private: +- int _af; ++ // int _af; + FibConfigTableObserverRtmV2& _rtmo; + }; + diff --git a/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.cc b/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.cc new file mode 100644 index 000000000000..d4632d6cd8c1 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.cc @@ -0,0 +1,15 @@ +--- ./fea/data_plane/managers/fea_data_plane_manager_linux.cc.orig 2011-03-16 21:27:48.000000000 +0000 ++++ ./fea/data_plane/managers/fea_data_plane_manager_linux.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -71,8 +71,10 @@ + + + FeaDataPlaneManagerLinux::FeaDataPlaneManagerLinux(FeaNode& fea_node) +- : FeaDataPlaneManager(fea_node, "Linux"), +- _ifconfig_get_ioctl(NULL) ++ : FeaDataPlaneManager(fea_node, "Linux") ++#if defined(HAVE_PROC_LINUX) && defined(HAVE_IOCTL_SIOCGIFCONF) and !defined(HAVE_NETLINK_SOCKETS) ++ , _ifconfig_get_ioctl(NULL) ++#endif + { + } + diff --git a/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.hh b/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.hh new file mode 100644 index 000000000000..3856acf3d8a3 --- /dev/null +++ b/net/xorp/files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.hh @@ -0,0 +1,14 @@ +--- ./fea/data_plane/managers/fea_data_plane_manager_linux.hh.orig 2011-03-16 21:27:48.000000000 +0000 ++++ ./fea/data_plane/managers/fea_data_plane_manager_linux.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -118,10 +118,10 @@ + * @return the @ref IfConfigGetIoctl plugin. + */ + IfConfigGetIoctl* ifconfig_get_ioctl() { return (_ifconfig_get_ioctl); } +-#endif + + private: + IfConfigGetIoctl* _ifconfig_get_ioctl; ++#endif + }; + + #endif // __FEA_DATA_PLANE_MANAGERS_FEA_DATA_PLANE_MANAGER_LINUX_HH__ diff --git a/net/xorp/files/patch-fea__fibconfig.hh b/net/xorp/files/patch-fea__fibconfig.hh new file mode 100644 index 000000000000..6fde63661e67 --- /dev/null +++ b/net/xorp/files/patch-fea__fibconfig.hh @@ -0,0 +1,18 @@ +--- ./fea/fibconfig.hh.orig 2012-01-11 17:46:45.000000000 +0000 ++++ ./fea/fibconfig.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -736,12 +736,14 @@ + */ + Trie6& trie6() { return _trie6; } + ++ FeaNode& _fea_node; ++ + protected: + Trie4 _trie4; // IPv4 trie (used for testing purpose) + Trie6 _trie6; // IPv6 trie (used for testing purpose) + + private: +- FeaNode& _fea_node; ++ // FeaNode& _fea_node; + EventLoop& _eventloop; + #ifndef XORP_DISABLE_PROFILE + Profile& _profile; diff --git a/net/xorp/files/patch-fea__firewall_manager.hh b/net/xorp/files/patch-fea__firewall_manager.hh new file mode 100644 index 000000000000..1981825ff66e --- /dev/null +++ b/net/xorp/files/patch-fea__firewall_manager.hh @@ -0,0 +1,20 @@ +--- ./fea/firewall_manager.hh.orig 2011-03-16 21:27:49.000000000 +0000 ++++ ./fea/firewall_manager.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -313,6 +313,8 @@ + */ + void delete_browse_state(uint32_t token); + ++ FeaNode& _fea_node; ++ + private: + /** + * Update the firewall entries by pushing them into the underlying system. +@@ -364,7 +366,7 @@ + */ + void generate_token(); + +- FeaNode& _fea_node; ++ // FeaNode& _fea_node; + EventLoop& _eventloop; + const IfTree& _iftree; + diff --git a/net/xorp/files/patch-fea__ifconfig.hh b/net/xorp/files/patch-fea__ifconfig.hh new file mode 100644 index 000000000000..ca95da0b0af7 --- /dev/null +++ b/net/xorp/files/patch-fea__ifconfig.hh @@ -0,0 +1,20 @@ +--- ./fea/ifconfig.hh.orig 2011-03-16 21:27:49.000000000 +0000 ++++ ./fea/ifconfig.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -442,6 +442,8 @@ + */ + void report_updates(IfTree& iftree); + ++ FeaNode& _fea_node; ++ + private: + /** + * Restore the interface configuration. +@@ -455,7 +457,7 @@ + const IfTree& old_system_config, + string& error_msg); + +- FeaNode& _fea_node; ++ // FeaNode& _fea_node; + EventLoop& _eventloop; + NexthopPortMapper& _nexthop_port_mapper; + IfConfigTransactionManager* _itm; // The interface transaction manager diff --git a/net/xorp/files/patch-fea__mfea_mrouter.hh b/net/xorp/files/patch-fea__mfea_mrouter.hh new file mode 100644 index 000000000000..c2f9c4a7979c --- /dev/null +++ b/net/xorp/files/patch-fea__mfea_mrouter.hh @@ -0,0 +1,11 @@ +--- ./fea/mfea_mrouter.hh.orig 2011-03-16 21:27:49.000000000 +0000 ++++ ./fea/mfea_mrouter.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -437,6 +437,8 @@ + // Original state from the underlying system before the MFEA was started + // + bool _multicast_forwarding_enabled; ++ ++public: + const FibConfig& _fibconfig; + }; + diff --git a/net/xorp/files/patch-fea__tools__show_interfaces.hh b/net/xorp/files/patch-fea__tools__show_interfaces.hh new file mode 100644 index 000000000000..1372d540321e --- /dev/null +++ b/net/xorp/files/patch-fea__tools__show_interfaces.hh @@ -0,0 +1,20 @@ +--- ./fea/tools/show_interfaces.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./fea/tools/show_interfaces.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -79,6 +79,8 @@ + */ + void print_interfaces(const string& print_iface_name) const; + ++ EventLoop& _eventloop; ++ + protected: + // + // IfMgrHintObserver methods +@@ -132,7 +134,7 @@ + */ + int ifmgr_shutdown(); + +- EventLoop& _eventloop; ++ // EventLoop& _eventloop; + + IfMgrXrlMirror _ifmgr; + diff --git a/net/xorp/files/patch-fea__xrl_mfea_node.hh b/net/xorp/files/patch-fea__xrl_mfea_node.hh new file mode 100644 index 000000000000..a964b5e11e57 --- /dev/null +++ b/net/xorp/files/patch-fea__xrl_mfea_node.hh @@ -0,0 +1,20 @@ +--- ./fea/xrl_mfea_node.hh.orig 2011-03-16 21:27:49.000000000 +0000 ++++ ./fea/xrl_mfea_node.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -504,6 +504,8 @@ + // Input values, + const bool& enable); + ++ EventLoop& _eventloop; ++ + private: + /** + * Called when Finder connection is established. +@@ -570,7 +572,7 @@ + + int family() const { return (MfeaNode::family()); } + +- EventLoop& _eventloop; ++ // EventLoop& _eventloop; + const string _finder_target; + + XrlMfeaClientV0p1Client _xrl_mfea_client_client; diff --git a/net/xorp/files/patch-libproto__packet.cc b/net/xorp/files/patch-libproto__packet.cc new file mode 100644 index 000000000000..06279f227035 --- /dev/null +++ b/net/xorp/files/patch-libproto__packet.cc @@ -0,0 +1,11 @@ +--- ./libproto/packet.cc.orig 2011-03-16 21:27:50.000000000 +0000 ++++ ./libproto/packet.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -233,7 +233,7 @@ + } + + ArpHeader::ArpHeader() { +- memset(this, 0, sizeof(this)); ++ memset(this, 0, sizeof(*this)); + ah_hw_len = 6; + ah_proto_len = 4; + } diff --git a/net/xorp/files/patch-libxipc__xrl_pf_stcp.cc b/net/xorp/files/patch-libxipc__xrl_pf_stcp.cc new file mode 100644 index 000000000000..a22f6fdced95 --- /dev/null +++ b/net/xorp/files/patch-libxipc__xrl_pf_stcp.cc @@ -0,0 +1,29 @@ +--- ./libxipc/xrl_pf_stcp.cc.orig 2011-09-08 17:46:00.000000000 +0000 ++++ ./libxipc/xrl_pf_stcp.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -584,7 +584,7 @@ + uint32_t sn, + const Xrl& x, + const Callback& cb) +- : _p(p), _sn(sn), _b(_buffer), _cb(cb), _keepalive(false) ++ : _p(p), _sn(sn), _b(_buffer), _cb(cb) //, _keepalive(false) + { + size_t header_bytes = STCPPacketHeader::header_size(); + size_t xrl_bytes = x.packed_bytes(); +@@ -607,7 +607,7 @@ + } + + RequestState(XrlPFSTCPSender* p, uint32_t sn) +- : _p(p), _sn(sn), _b(_buffer), _keepalive(true) ++ : _p(p), _sn(sn), _b(_buffer) //, _keepalive(true) + { + size_t header_bytes = STCPPacketHeader::header_size(); + +@@ -650,7 +650,7 @@ + uint8_t _buffer[256]; // XXX important performance parameter + uint32_t _size; + Callback _cb; +- bool _keepalive; ++ // bool _keepalive; + }; + + diff --git a/net/xorp/files/patch-libxorp-utility.h b/net/xorp/files/patch-libxorp-utility.h deleted file mode 100644 index 76d633750b64..000000000000 --- a/net/xorp/files/patch-libxorp-utility.h +++ /dev/null @@ -1,20 +0,0 @@ ---- libxorp/utility.h.orig 2012-10-01 17:45:19.000000000 +0800 -+++ libxorp/utility.h 2012-10-01 17:47:34.000000000 +0800 -@@ -31,7 +31,7 @@ - * Compile time assertion. - */ - #ifndef static_assert --#define static_assert(a) switch (a) case 0: case (a): -+#define static_assert(a) ((void)sizeof(int[(a) ? 1 : -1])) - #endif /* static_assert */ - - /* -@@ -42,7 +42,7 @@ - #ifdef UNUSED - # undef UNUSED - #endif /* UNUSED */ --#define UNUSED(var) static_assert(sizeof(var) != 0) -+#define UNUSED(var) ((void)var) - - #ifdef __cplusplus - #define cstring(s) (s).str().c_str() diff --git a/net/xorp/files/patch-mibs-bgp4_mib_1657_bgp4pathattrtable.cc b/net/xorp/files/patch-mibs-bgp4_mib_1657_bgp4pathattrtable.cc deleted file mode 100644 index dab5442fd7b3..000000000000 --- a/net/xorp/files/patch-mibs-bgp4_mib_1657_bgp4pathattrtable.cc +++ /dev/null @@ -1,35 +0,0 @@ ---- mibs/bgp4_mib_1657_bgp4pathattrtable.cc.orig 2009-01-05 18:31:00.000000000 +0000 -+++ mibs/bgp4_mib_1657_bgp4pathattrtable.cc 2011-12-27 03:17:03.000000000 +0000 -@@ -139,7 +139,7 @@ - DEBUGMSGTL((BgpMib::the_instance().name(), - "updating local bgp4PathAttrTable...\n")); - DEBUGMSGTL((BgpMib::the_instance().name(), -- "local table size: %d\n", CONTAINER_SIZE(cb.container))); -+ "local table size: %zd\n", CONTAINER_SIZE(cb.container))); - bgp_mib.send_get_v4_route_list_start("bgp", net, true, false, - callback(get_v4_route_list_start_done)); - break; -@@ -156,12 +156,12 @@ - DEBUGMSGTL((BgpMib::the_instance().name(), - "removing old routes from bgp4PathAttrTable...\n")); - DEBUGMSGTL((BgpMib::the_instance().name(), -- "local table size: %d old_routes stack: %d\n", -+ "local table size: %zd old_routes stack: %zd\n", - CONTAINER_SIZE(cb.container), update.old_routes.size())); - CONTAINER_FOR_EACH(cb.container, find_old_routes, NULL); - while (update.old_routes.size()) { - DEBUGMSGTL((BgpMib::the_instance().name(), -- "update.old_routes.size() = %d\n", -+ "update.old_routes.size() = %zd\n", - update.old_routes.size())); - row = (bgp4PathAttrTable_context*) - CONTAINER_FIND(cb.container, &update.old_routes.top()); -@@ -745,7 +745,7 @@ - - if (row->update_signature != (update.list_token)) { - DEBUGMSGTL((BgpMib::the_instance().name(), -- "removing %#010x from table\n", row->bgp4PathAttrIpAddrPrefix)); -+ "removing %#010lx from table\n", row->bgp4PathAttrIpAddrPrefix)); - update.old_routes.push(row->index); - } - } diff --git a/net/xorp/files/patch-mibs-bgp4_mib_1657_bgppeertable.cc b/net/xorp/files/patch-mibs-bgp4_mib_1657_bgppeertable.cc deleted file mode 100644 index 1a1f1bd17b20..000000000000 --- a/net/xorp/files/patch-mibs-bgp4_mib_1657_bgppeertable.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mibs/bgp4_mib_1657_bgppeertable.cc-orig 2011-12-27 00:37:40.000000000 +0000 -+++ mibs/bgp4_mib_1657_bgppeertable.cc 2011-12-27 00:38:11.000000000 +0000 -@@ -476,7 +476,7 @@ - - void free_context(void * context, struct netsnmp_iterator_info_s * /* iinfo */) - { -- DEBUGMSGTL((BgpMib::the_instance().name(),"freeing context %x\n", context)); -+ DEBUGMSGTL((BgpMib::the_instance().name(),"freeing context %p\n", context)); - if (NULL != context) free(context); - context = NULL; - } diff --git a/net/xorp/files/patch-mibs-xorpevents.cc b/net/xorp/files/patch-mibs-xorpevents.cc deleted file mode 100644 index 28298d110291..000000000000 --- a/net/xorp/files/patch-mibs-xorpevents.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- mibs/xorpevents.cc-orig 2011-12-27 00:35:22.000000000 +0000 -+++ mibs/xorpevents.cc 2011-12-27 00:36:01.000000000 +0000 -@@ -55,7 +55,7 @@ - { - SnmpEventLoop& e = SnmpEventLoop::the_instance(); - DEBUGMSGTL((e._log_name, "run all xorp timers\n")); -- DEBUGMSGTL((e._log_name, "# of timers: %d\n", e.timer_list().size())); -+ DEBUGMSGTL((e._log_name, "# of timers: %zd\n", e.timer_list().size())); - e.timer_list().run(); - SnmpEventLoop::AlarmMap::iterator p; - for (p = e._pending_alarms.begin(); p != e._pending_alarms.end(); ++p) { diff --git a/net/xorp/files/patch-pim__pim_mrt_task.cc b/net/xorp/files/patch-pim__pim_mrt_task.cc new file mode 100644 index 000000000000..6ebd56b8600b --- /dev/null +++ b/net/xorp/files/patch-pim__pim_mrt_task.cc @@ -0,0 +1,42 @@ +--- ./pim/pim_mrt_task.cc.orig 2011-09-20 00:33:28.000000000 +0000 ++++ ./pim/pim_mrt_task.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -166,7 +166,8 @@ + // + list<PimMreTask *>::reverse_iterator iter; + iter = pim_mre_task_list().rbegin(); +- if (iter != pim_mre_task_list().rend()) { ++// if (iter != pim_mre_task_list().rend()) { ++ if (pim_mre_task_list().end() != pim_mre_task_list().begin()) { + pim_mre_task = *iter; + if (pim_mre_task->input_state() + == PimMreTrackState::INPUT_STATE_IN_REMOVE_MISC) { +@@ -1159,7 +1160,8 @@ + // + list<PimMreTask *>::reverse_iterator iter; + iter = pim_mre_task_list().rbegin(); +- if (iter != pim_mre_task_list().rend()) { ++// if (iter != pim_mre_task_list().rend()) { ++ if (pim_mre_task_list().end() != pim_mre_task_list().begin()) { + pim_mre_task = *iter; + if (pim_mre_task->input_state() == input_state) { + pim_mre_task->add_pim_mre(pim_mre); +@@ -1224,7 +1226,8 @@ + // + list<PimMreTask *>::reverse_iterator iter; + iter = pim_mre_task_list().rbegin(); +- if (iter != pim_mre_task_list().rend()) { ++// if (iter != pim_mre_task_list().rend()) { ++ if (pim_mre_task_list().end() != pim_mre_task_list().begin()) { + pim_mre_task = *iter; + if (pim_mre_task->input_state() == input_state) { + pim_mre_task->add_pim_mre(pim_mre); // XXX +@@ -1266,7 +1269,8 @@ + // + list<PimMreTask *>::reverse_iterator iter; + iter = pim_mre_task_list().rbegin(); +- if (iter != pim_mre_task_list().rend()) { ++// if (iter != pim_mre_task_list().rend()) { ++ if (pim_mre_task_list().end() != pim_mre_task_list().begin()) { + pim_mre_task = *iter; + if (pim_mre_task->input_state() + == PimMreTrackState::INPUT_STATE_IN_REMOVE_PIM_MFC) { diff --git a/net/xorp/files/patch-policy__backend__iv_exec.cc b/net/xorp/files/patch-policy__backend__iv_exec.cc new file mode 100644 index 000000000000..0e77fa9347be --- /dev/null +++ b/net/xorp/files/patch-policy__backend__iv_exec.cc @@ -0,0 +1,15 @@ +--- ./policy/backend/iv_exec.cc.orig 2011-03-16 21:27:54.000000000 +0000 ++++ ./policy/backend/iv_exec.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -275,7 +275,11 @@ + IvExec::visit(Store& s) + { + if (_stackptr < _stack) +- xorp_throw(RuntimeError, "Stack empty on assign of " + s.var()); ++ // xorp_throw(RuntimeError, "Stack empty on assign of " + s.var()); ++ { char *tmpstr; ++ asprintf(&tmpstr, "Stack empty on assign of %d", s.var()); ++ xorp_throw(RuntimeError, tmpstr); ++ } + + const Element* arg = *_stackptr; + _stackptr--; diff --git a/net/xorp/files/patch-policy__backend__lex.yy_policy_backend_parser.cc b/net/xorp/files/patch-policy__backend__lex.yy_policy_backend_parser.cc new file mode 100644 index 000000000000..16f5d8b1df03 --- /dev/null +++ b/net/xorp/files/patch-policy__backend__lex.yy_policy_backend_parser.cc @@ -0,0 +1,11 @@ +--- ./policy/backend/lex.yy_policy_backend_parser.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./policy/backend/lex.yy_policy_backend_parser.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -617,6 +617,8 @@ + static int yy_flex_strlen (yyconst char * ); + #endif + ++#define YY_NO_INPUT ++ + #ifndef YY_NO_INPUT + + #ifdef __cplusplus diff --git a/net/xorp/files/patch-policy__backend__single_varrw.cc b/net/xorp/files/patch-policy__backend__single_varrw.cc new file mode 100644 index 000000000000..f33e9ac81593 --- /dev/null +++ b/net/xorp/files/patch-policy__backend__single_varrw.cc @@ -0,0 +1,15 @@ +--- ./policy/backend/single_varrw.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./policy/backend/single_varrw.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -70,7 +70,11 @@ + + // out of luck... + if(!e) +- xorp_throw(SingleVarRWErr, "Unable to read variable " + id); ++ // xorp_throw(SingleVarRWErr, "Unable to read variable " + id); ++ { char *tmpstr; ++ asprintf(&tmpstr, "Unable to read variable %d", id); ++ xorp_throw(SingleVarRWErr, tmpstr); ++ } + } + + return *e; diff --git a/net/xorp/files/patch-policy__configuration.cc b/net/xorp/files/patch-policy__configuration.cc new file mode 100644 index 000000000000..8df7b8c8c778 --- /dev/null +++ b/net/xorp/files/patch-policy__configuration.cc @@ -0,0 +1,13 @@ +--- ./policy/configuration.cc.orig 2011-03-16 21:27:54.000000000 +0000 ++++ ./policy/configuration.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -766,7 +766,9 @@ + POLICY* p = find_policy(proto); + XLOG_ASSERT(p); + +- for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) { ++// for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) { ++ if (! p->empty()) ++ for (POLICY::iterator i = p->end(); --i != p->begin(); ) { + PolicyList* pl = i->second; + + pl->link_code(code); diff --git a/net/xorp/files/patch-policy__configuration.hh b/net/xorp/files/patch-policy__configuration.hh new file mode 100644 index 000000000000..6fba04e7a3d9 --- /dev/null +++ b/net/xorp/files/patch-policy__configuration.hh @@ -0,0 +1,22 @@ +--- ./policy/configuration.hh.orig 2011-03-16 21:27:54.000000000 +0000 ++++ ./policy/configuration.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -43,11 +43,19 @@ + + // XXX we go reverse in order to make peer specific policies override global + // ones. Global is "" so it's always smallest (first). ++/* + #define FOR_ALL_POLICIES(n) \ + for (PROTOCOL::reverse_iterator i = _protocols.rbegin(); \ + i != _protocols.rend(); ++i) \ + for (POLICY::reverse_iterator n = i->second->rbegin(); \ + n != i->second->rend(); ++n) ++*/ ++#define FOR_ALL_POLICIES(n) \ ++ if (! _protocols.empty()) \ ++ for (PROTOCOL::iterator i = _protocols.end(); \ ++ i-- != _protocols.begin(); ) \ ++ for (POLICY::iterator n = i->second->end(); \ ++ (! i->second->empty()) & (n-- != i->second->begin()); ) + + class IEMap { + public: diff --git a/net/xorp/files/patch-policy__lex.yy_policy_parser.cc b/net/xorp/files/patch-policy__lex.yy_policy_parser.cc new file mode 100644 index 000000000000..985313fb2223 --- /dev/null +++ b/net/xorp/files/patch-policy__lex.yy_policy_parser.cc @@ -0,0 +1,10 @@ +--- ./policy/lex.yy_policy_parser.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./policy/lex.yy_policy_parser.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -2982,6 +2982,7 @@ + static int yy_flex_strlen (yyconst char * ); + #endif + ++#define YY_NO_INPUT + #ifndef YY_NO_INPUT + + #ifdef __cplusplus diff --git a/net/xorp/files/patch-rib__vifmanager.hh b/net/xorp/files/patch-rib__vifmanager.hh new file mode 100644 index 000000000000..ff7befbe0ab7 --- /dev/null +++ b/net/xorp/files/patch-rib__vifmanager.hh @@ -0,0 +1,23 @@ +--- ./rib/vifmanager.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./rib/vifmanager.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -110,6 +110,9 @@ + */ + int final_stop(); + ++ XrlRouter& _xrl_router; ++ EventLoop& _eventloop; ++ + protected: + // + // IfMgrHintObserver methods +@@ -163,8 +166,8 @@ + */ + int ifmgr_shutdown(); + +- XrlRouter& _xrl_router; +- EventLoop& _eventloop; ++ // XrlRouter& _xrl_router; ++ // EventLoop& _eventloop; + RibManager* _rib_manager; + + IfMgrXrlMirror _ifmgr; diff --git a/net/xorp/files/patch-rip__packets.hh b/net/xorp/files/patch-rip__packets.hh new file mode 100644 index 000000000000..603d149ea269 --- /dev/null +++ b/net/xorp/files/patch-rip__packets.hh @@ -0,0 +1,10 @@ +--- ./rip/packets.hh.orig 2011-03-16 21:16:12.000000000 +0000 ++++ ./rip/packets.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -586,6 +586,7 @@ + const uint8_t* _key_id; // Key number used + const uint8_t* _auth_bytes; // Auth data length at end of packet + const uint8_t* _seqno; // Monotonically increasing seqno ++public: + const uint8_t* _mbz; // Must-be-zero + }; + diff --git a/net/xorp/files/patch-rtrmgr__cli.cc b/net/xorp/files/patch-rtrmgr__cli.cc new file mode 100644 index 000000000000..60f30869888c --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__cli.cc @@ -0,0 +1,20 @@ +--- ./rtrmgr/cli.cc.orig 2011-03-16 21:16:13.000000000 +0000 ++++ ./rtrmgr/cli.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -741,7 +741,7 @@ + path = token_vector2line(command_global_name); + XLOG_ASSERT(path.substr(0, 4) == "help"); + if (path.size() == 4) { +- trimmed_path == ""; ++ trimmed_path = ""; + } else { + XLOG_ASSERT(path.substr(0, 5) == "help "); + trimmed_path = path.substr(5, path.size() - 5); +@@ -1062,7 +1062,7 @@ + path = token_vector2line(command_global_name); + XLOG_ASSERT(path.substr(0, 4) == "help"); + if (path.size() == 4) { +- trimmed_path == ""; ++ trimmed_path = ""; + } else { + XLOG_ASSERT(path.substr(0, 5) == "help "); + trimmed_path = path.substr(5, path.size() - 5); diff --git a/net/xorp/files/patch-rtrmgr__lex.boot.cc b/net/xorp/files/patch-rtrmgr__lex.boot.cc new file mode 100644 index 000000000000..caf43c9dc51a --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__lex.boot.cc @@ -0,0 +1,27 @@ +--- ./rtrmgr/lex.boot.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./rtrmgr/lex.boot.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -9552,6 +9552,7 @@ + static int yy_flex_strlen YY_PROTO(( yyconst char * )); + #endif + ++#define YY_NO_INPUT + #ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput YY_PROTO(( void )); +@@ -10483,6 +10484,7 @@ + #endif /* ifndef YY_NO_UNPUT */ + + ++#ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput() + #else +@@ -10554,7 +10556,7 @@ + + return c; + } +- ++#endif + + #ifdef YY_USE_PROTOS + void yyrestart( FILE *input_file ) diff --git a/net/xorp/files/patch-rtrmgr__lex.opcmd.cc b/net/xorp/files/patch-rtrmgr__lex.opcmd.cc new file mode 100644 index 000000000000..1926b77c5283 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__lex.opcmd.cc @@ -0,0 +1,27 @@ +--- ./rtrmgr/lex.opcmd.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./rtrmgr/lex.opcmd.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -518,6 +518,7 @@ + static int yy_flex_strlen YY_PROTO(( yyconst char * )); + #endif + ++#define YY_NO_INPUT + #ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput YY_PROTO(( void )); +@@ -1322,6 +1323,7 @@ + #endif /* ifndef YY_NO_UNPUT */ + + ++#ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput() + #else +@@ -1393,7 +1395,7 @@ + + return c; + } +- ++#endif + + #ifdef YY_USE_PROTOS + void yyrestart( FILE *input_file ) diff --git a/net/xorp/files/patch-rtrmgr__lex.tplt.cc b/net/xorp/files/patch-rtrmgr__lex.tplt.cc new file mode 100644 index 000000000000..9ebfb9dfe37f --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__lex.tplt.cc @@ -0,0 +1,27 @@ +--- ./rtrmgr/lex.tplt.cc.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./rtrmgr/lex.tplt.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -8667,6 +8667,7 @@ + static int yy_flex_strlen YY_PROTO(( yyconst char * )); + #endif + ++#define YY_NO_INPUT + #ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput YY_PROTO(( void )); +@@ -9708,6 +9709,7 @@ + #endif /* ifndef YY_NO_UNPUT */ + + ++#ifndef YY_NO_INPUT + #ifdef __cplusplus + static int yyinput() + #else +@@ -9779,7 +9781,7 @@ + + return c; + } +- ++#endif + + #ifdef YY_USE_PROTOS + void yyrestart( FILE *input_file ) diff --git a/net/xorp/files/patch-rtrmgr__module_command.hh b/net/xorp/files/patch-rtrmgr__module_command.hh new file mode 100644 index 000000000000..2fc5caaa5cee --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__module_command.hh @@ -0,0 +1,10 @@ +--- ./rtrmgr/module_command.hh.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./rtrmgr/module_command.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -87,6 +87,7 @@ + Action* _status_method; + Action* _startup_method; + Action* _shutdown_method; ++public: + bool _execute_done; + bool _verbose; // Set to true if output is verbose + }; diff --git a/net/xorp/files/patch-rtrmgr__module_manager.hh b/net/xorp/files/patch-rtrmgr__module_manager.hh new file mode 100644 index 000000000000..105233a9b7fc --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__module_manager.hh @@ -0,0 +1,12 @@ +--- ./rtrmgr/module_manager.hh.orig 2011-09-20 00:33:28.000000000 +0000 ++++ ./rtrmgr/module_manager.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -144,7 +144,9 @@ + string _expath; // The expanded absolute path to the program + bool _do_exec; // false indicates we're running in test mode, + // when we may not actually start any processes ++public: + bool _verbose; // Set to true if output is verbose ++private: + XorpTimer _shutdown_timer; // A timer used during shutdown + XorpCallback0<void>::RefPtr _terminate_cb; // The cb when module terminated + }; diff --git a/net/xorp/files/patch-rtrmgr__op_commands.hh b/net/xorp/files/patch-rtrmgr__op_commands.hh new file mode 100644 index 000000000000..717c1606525c --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__op_commands.hh @@ -0,0 +1,11 @@ +--- ./rtrmgr/op_commands.hh.orig 2011-03-16 21:27:56.000000000 +0000 ++++ ./rtrmgr/op_commands.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -215,7 +215,7 @@ + + // Below here is temporary storage for use in parsing + list<string> _path_segments; +- OpCommand* _current_command; ++ // OpCommand* _current_command; + const TemplateTree* _template_tree; + SlaveConfigTree* _slave_config_tree; + SlaveModuleManager& _mmgr; diff --git a/net/xorp/files/patch-rtrmgr__template_commands.hh b/net/xorp/files/patch-rtrmgr__template_commands.hh new file mode 100644 index 000000000000..f35fe1214c51 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__template_commands.hh @@ -0,0 +1,20 @@ +--- ./rtrmgr/template_commands.hh.orig 2011-03-16 21:16:14.000000000 +0000 ++++ ./rtrmgr/template_commands.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -78,6 +78,8 @@ + string related_module() const; + string affected_module() const; + ++ const XRLdb* _xrldb; ++ + private: + #ifdef DEBUG_XRLDB + bool check_xrl_is_valid(const list<string>& action, +@@ -92,7 +94,7 @@ + string _request; + list<string> _split_response; + string _response; +- const XRLdb* _xrldb; ++ // const XRLdb* _xrldb; + }; + + class ProgramAction : public Action { diff --git a/net/xorp/files/patch-rtrmgr__template_tree_node.cc b/net/xorp/files/patch-rtrmgr__template_tree_node.cc new file mode 100644 index 000000000000..5cc498bfffd6 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__template_tree_node.cc @@ -0,0 +1,17 @@ +--- ./rtrmgr/template_tree_node.cc.orig 2011-03-16 21:16:14.000000000 +0000 ++++ ./rtrmgr/template_tree_node.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -543,9 +543,12 @@ + { + map<string,string> varmap; + const TemplateTreeNode* ttn = this; +- list<string>::const_reverse_iterator iter; ++ // list<string>::const_reverse_iterator iter; ++ list<string>::const_iterator iter; + +- for (iter = segments.rbegin(); iter != segments.rend(); ++iter) { ++// for (iter = segments.rbegin(); iter != segments.rend(); ++iter) { ++ if (! segments.empty()) ++ for (iter = segments.end(); iter-- != segments.begin(); ) { + if (ttn->name_is_variable()) + varmap[ttn->segname()] = *iter; + ttn = ttn->parent(); diff --git a/net/xorp/files/patch-rtrmgr__template_tree_node.hh b/net/xorp/files/patch-rtrmgr__template_tree_node.hh new file mode 100644 index 000000000000..733a30d2f4a6 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__template_tree_node.hh @@ -0,0 +1,19 @@ +--- ./rtrmgr/template_tree_node.hh.orig 2011-03-16 21:16:14.000000000 +0000 ++++ ./rtrmgr/template_tree_node.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -189,13 +189,15 @@ + TemplateTreeNode* _parent; + list<TemplateTreeNode*> _children; + ++ TemplateTree& _template_tree; ++ + private: + bool split_up_varname(const string& varname, + list<string>& var_parts) const; + TemplateTreeNode* find_parent_varname_node(const list<string>& var_parts); + TemplateTreeNode* find_child_varname_node(const list<string>& var_parts); + +- TemplateTree& _template_tree; ++ // TemplateTree& _template_tree; + + string _module_name; + string _default_target_name; diff --git a/net/xorp/files/patch-rtrmgr__userdb.hh b/net/xorp/files/patch-rtrmgr__userdb.hh new file mode 100644 index 000000000000..a4c695222b36 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__userdb.hh @@ -0,0 +1,10 @@ +--- ./rtrmgr/userdb.hh.orig 2011-03-16 21:16:14.000000000 +0000 ++++ ./rtrmgr/userdb.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -98,6 +98,7 @@ + + private: + map<uid_t, User*> _users; ++public: + bool _verbose; // Set to true if output is verbose + }; + diff --git a/net/xorp/files/patch-rtrmgr__xorpsh_main.cc b/net/xorp/files/patch-rtrmgr__xorpsh_main.cc new file mode 100644 index 000000000000..506967d4c733 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__xorpsh_main.cc @@ -0,0 +1,20 @@ +--- ./rtrmgr/xorpsh_main.cc.orig 2012-01-11 17:46:45.000000000 +0000 ++++ ./rtrmgr/xorpsh_main.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -146,7 +146,7 @@ + _verbose(verbose), + _ipc_name(IPCname), + _got_config(false), +- _got_modules(false), ++ // _got_modules(false), + _mode(MODE_INITIALIZING), + _xorpsh_interface(&_xrl_router, *this) + { +@@ -667,7 +667,7 @@ + _router_cli->notify_user(response, /* urgent */ true); + // XXX it's not clear we can continue if this happens + } +- response == ""; ++ // response == ""; + if (!_ct->apply_deletions(user_id, deletions, + /* this is not a provisional change */ false, + response)) { diff --git a/net/xorp/files/patch-rtrmgr__xorpsh_main.hh b/net/xorp/files/patch-rtrmgr__xorpsh_main.hh new file mode 100644 index 000000000000..c0edeb9c4aa9 --- /dev/null +++ b/net/xorp/files/patch-rtrmgr__xorpsh_main.hh @@ -0,0 +1,11 @@ +--- ./rtrmgr/xorpsh_main.hh.orig 2011-03-16 21:16:14.000000000 +0000 ++++ ./rtrmgr/xorpsh_main.hh 2014-02-26 21:17:13.000000000 +0000 +@@ -151,7 +151,7 @@ + string _authfile; + string _authtoken; + bool _got_config; +- bool _got_modules; ++ // bool _got_modules; + string _configuration; + + bool _xrl_generic_done; // XRL startup/shutdown flag diff --git a/net/xorp/files/patch-site_scons__config__allconfig.py b/net/xorp/files/patch-site_scons__config__allconfig.py new file mode 100644 index 000000000000..302e61a0c098 --- /dev/null +++ b/net/xorp/files/patch-site_scons__config__allconfig.py @@ -0,0 +1,26 @@ +--- ./site_scons/config/allconfig.py.orig 2012-01-11 17:46:46.000000000 +0000 ++++ ./site_scons/config/allconfig.py 2014-02-26 21:17:13.000000000 +0000 +@@ -21,6 +21,7 @@ + import os + import string + from SCons.Script.SConscript import SConsEnvironment ++import fnmatch; + + # TODO SCons support for headerfilename needs to be fixed at source-- + # that would let us use confdefs.h for the include file header +@@ -226,10 +227,12 @@ + if has_af_inet and has_sock_raw: + conf.Define('HAVE_IP_RAW_SOCKETS') + # TODO: This needs to be properly detected. +- # TODO: This used to check for bsd and linux in an error prone +- # way. Now, do negative checks, but this could break Solaris ++ # <http://www.xorp.org/bugzilla/show_bug.cgi?id=106#c1>: ++ # TODO: This used to check for openbsd and linux in an error prone ++ # way. Now, do negative checks, but this could break Solaris and other OS + # (or not..no idea if it supports raw or not). +- if not (env.has_key('mingw') and env['mingw']): ++ if not ((env.has_key('mingw') and env['mingw']) or ++ fnmatch.fnmatch(host_os, 'freebsd*')): + conf.Define('IPV4_RAW_OUTPUT_IS_RAW') + conf.Define('IPV4_RAW_INPUT_IS_RAW') + diff --git a/net/xorp/files/patch-vrrp__vrrp.cc b/net/xorp/files/patch-vrrp__vrrp.cc new file mode 100644 index 000000000000..7cbf0b1c0212 --- /dev/null +++ b/net/xorp/files/patch-vrrp__vrrp.cc @@ -0,0 +1,29 @@ +--- ./vrrp/vrrp.cc.orig 2011-03-16 21:27:57.000000000 +0000 ++++ ./vrrp/vrrp.cc 2014-02-26 21:17:13.000000000 +0000 +@@ -36,7 +36,7 @@ + + template <class T> + void +-out_of_range(const string& msg, const T& x) ++out_of_range_(const string& msg, const T& x) + { + ostringstream oss; + +@@ -64,7 +64,7 @@ + //, _arpd(_vif) + { + if (_vrid < 1 || _vrid > 255) +- out_of_range("VRID out of range", _vrid); ++ out_of_range_("VRID out of range", _vrid); + + char tmp[sizeof "ff:ff:ff:ff:ff:ff"]; + +@@ -94,7 +94,7 @@ + Vrrp::set_priority(uint32_t priority) + { + if (priority == PRIORITY_LEAVE || priority >= PRIORITY_OWN) +- out_of_range("priority out of range", priority); ++ out_of_range_("priority out of range", priority); + + _priority = priority; + diff --git a/net/xorp/files/patch-xrl__scripts__Xif__parse.py b/net/xorp/files/patch-xrl__scripts__Xif__parse.py new file mode 100644 index 000000000000..ae0c845b470a --- /dev/null +++ b/net/xorp/files/patch-xrl__scripts__Xif__parse.py @@ -0,0 +1,14 @@ +--- ./xrl/scripts/Xif/parse.py.orig 2010-07-19 21:10:33.000000000 +0000 ++++ ./xrl/scripts/Xif/parse.py 2014-02-26 21:17:13.000000000 +0000 +@@ -71,8 +71,10 @@ + pop_file() + pop_file() + push_file(file, line) ++ elif (flag == "3") or (flag == "4"): ++ print "Pre-processor #line flag (%s)" % flag + else: +- print "Invalid pre-processor #line flag (%d)\n", flag ++ print "Invalid pre-processor #line flag (%s)" % flag + sys.exit(1) + return 1 + diff --git a/net/xorp/files/pkg-message.in b/net/xorp/files/pkg-message.in new file mode 100644 index 000000000000..45d4fb425ca2 --- /dev/null +++ b/net/xorp/files/pkg-message.in @@ -0,0 +1,14 @@ +Add the following lines to /etc/rc.conf to enable xorp: + +defaultrouter="NO" +xorp_enable="YES" + +A configuration file must be created at + +%%PREFIX%%/etc/xorp.conf + +before use. + +Users who will be changing the xorp configuration via +%%PREFIX%%/sbin/xorpsh +must be members of the group xorp. diff --git a/net/xorp/files/xorp.in b/net/xorp/files/xorp.in index 8f037d3df567..38418281f9d6 100644 --- a/net/xorp/files/xorp.in +++ b/net/xorp/files/xorp.in @@ -6,96 +6,68 @@ # # PROVIDE: xorp -# REQUIRE: netif routing mountcritlocal +# REQUIRE: netif routing mountcritlocal ldconfig # BEFORE: NETWORKING +# KEYWORD: shutdown -# Add the following lines to /etc/rc.conf to enable xorp: +# Add the following line to /etc/rc.conf to enable xorp: # # xorp_enable="YES" -# xorp_flags="<set as needed>" -# xorp_config_boot="%%PREFIX%%/etc/xorp.conf.sample" +# +# Note: You have to create a config file before you can start xorp! +# Set ${xorp_conf} to its location, the default is defined below. +# +# Besides the xorp_* variables which you'll find below with their +# default values, you can also define the following in rc.conf: +# +# xorp_rtprio=n +# +# This will run the xorp processes with realtime priority n, see rtprio(1). . /etc/rc.subr -name="xorp" +name=xorp rcvar=xorp_enable load_rc_config $name -: ${xorp_enable="NO"} -: ${xorp_config_boot="%%PREFIX%%/etc/xorp.conf"} -: ${xorp_rtrmgr_pidfile="/var/run/xorp_rtrmgr.pid"} -: ${xorp_rtrmgr_logfile="/var/log/xorp_rtrmgr.log"} -: ${xorp_rtrmgr_poll_enable=true} -: ${xorp_rtrmgr_poll_timeout=90} -: ${xorp_hardkill_enable=false} - -required_files=${xorp_config_boot} -command=%%PREFIX%%/bin/xorp_rtrmgr -command_args="-b ${xorp_config_boot}" +: ${xorp_enable:=NO} +: ${xorp_conf=%%PREFIX%%/etc/xorp.conf} +: ${xorp_rtrmgr_pidfile=/var/run/xorp_rtrmgr.pid} +: ${xorp_rtrmgr_logfile=/var/log/xorp_rtrmgr.log} +: ${xorp_flags=-l ${xorp_rtrmgr_logfile}} +: ${xorp_hardkill_enable:=NO} + +required_files=${xorp_conf} + +command=%%PREFIX%%/sbin/xorp_rtrmgr pidfile=${xorp_rtrmgr_pidfile} +logfile=${xorp_rtrmgr_logfile} +command_args="-d -c ${xorp_conf} -P ${pidfile}" sig_stop=INT -start_precmd="xorp_prestart" -start_cmd="xorp_start" -stop_postcmd="xorp_poststop" +start_precmd=xorp_prestart +stop_postcmd=xorp_poststop xorp_prestart() { - touch ${xorp_rtrmgr_logfile} - return 0 -} - -xorp_start() -{ - pidfile=${xorp_rtrmgr_pidfile} - - echo -n 'Starting XORP router processes:' - - echo -n ' xorp_rtrmgr' - if ! daemon </dev/null >>${xorp_rtrmgr_logfile} 2>&1 -c -p ${pidfile} \ - ${command} ${command_args} ; then - warn 'could not bring up xorp_rtrmgr.' - return 1 - fi + [ -z ${logfile} ] || [ -f ${logfile} ] || touch ${logfile} - ${xorp_rtrmgr_poll_enable} || return 0 - - # If startup polling is enabled, then poll xorp_rtrmgr every - # second to see if it died, or if it logged successful bringup. - # XXX This may be racy on very fast machines, but without - # daemonizing support from xorp_rtrmgr it's difficult not to race. - - pid=$(cat ${xorp_rtrmgr_pidfile}) - timeout=${xorp_rtrmgr_poll_timeout} - tick=0 - fail=true - - until [ $tick = $timeout ]; - do - sleep 1 ; kill -0 ${pid} || break - if ( tail -5 ${xorp_rtrmgr_logfile} | \ - grep 'No more tasks to run' > /dev/null 2>&1 ) ; then - fail=false - break - fi - tick=$((tick + 1)) - done - - if $fail ; then - warn 'xorp_rtrmgr failed to start' - return 1 + # required for rtprio(1) until handled like nice(1) by rc.subr(8) + if [ -n "$xorp_rtprio" ] && [ "$xorp_rtprio" -ge 0 ] + then + rc_flags="$xorp_rtprio $command $xorp_flags" + command=/usr/sbin/rtprio fi - echo '.' return 0 } xorp_poststop() { - rm -f ${xorp_rtrmgr_pidfile} >/dev/null 2>&1 || true + rm -f ${pidfile} >/dev/null 2>&1 || true - ${xorp_hardkill_enable} || return 0 + checkyesno xorp_hardkill_enable || return 0 killall -9 -m xorp_\* || true return 0 |