diff options
author | spz <spz@pkgsrc.org> | 2007-09-07 21:26:31 +0000 |
---|---|---|
committer | spz <spz@pkgsrc.org> | 2007-09-07 21:26:31 +0000 |
commit | 015569be5a00c9d1d1aa90708fabc5b890173010 (patch) | |
tree | 8e443c899930e4c4762f261b73a232bee7e3d812 /net | |
parent | 223cc2638d2909c949f806751f0e7481a7112852 (diff) | |
download | pkgsrc-015569be5a00c9d1d1aa90708fabc5b890173010.tar.gz |
patches irrtoolset to handle extended autnums
most changes supplied by mlelstv@NetBSD.org (Michael van Elst)
patch to src/rpsl/rpsl/rptype.cc supplied by he@NetBSD.org (Havard Eidnes)
also fixes PR pkg/36807
Diffstat (limited to 'net')
-rw-r--r-- | net/irrtoolset-nox11/Makefile | 4 | ||||
-rw-r--r-- | net/irrtoolset-nox11/distinfo | 20 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-br | 13 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-ct | 14 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cu | 14 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cv | 13 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cw | 25 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cx | 40 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cy | 12 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-cz | 18 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-da | 33 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-db | 23 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-dc | 50 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-dd | 45 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-de | 34 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-df | 40 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-dg | 30 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-dh | 35 | ||||
-rw-r--r-- | net/irrtoolset-nox11/patches/patch-di | 17 |
19 files changed, 474 insertions, 6 deletions
diff --git a/net/irrtoolset-nox11/Makefile b/net/irrtoolset-nox11/Makefile index 6e4307974bc..baad9973184 100644 --- a/net/irrtoolset-nox11/Makefile +++ b/net/irrtoolset-nox11/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2007/06/20 06:24:11 spz Exp $ +# $NetBSD: Makefile,v 1.12 2007/09/07 21:26:31 spz Exp $ # DISTNAME= IRRToolSet-4.8.5 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= net MASTER_SITES= ftp://ftp.isc.org/isc/IRRToolSet/IRRToolSet-4.8.5/ diff --git a/net/irrtoolset-nox11/distinfo b/net/irrtoolset-nox11/distinfo index ad9ef83d5b8..d09df8d389d 100644 --- a/net/irrtoolset-nox11/distinfo +++ b/net/irrtoolset-nox11/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2007/05/22 12:18:24 spz Exp $ +$NetBSD: distinfo,v 1.11 2007/09/07 21:26:31 spz Exp $ SHA1 (IRRToolSet-4.8.5.tar.gz) = 0a22daef3c5c04b5bce929e420233885c44662ec RMD160 (IRRToolSet-4.8.5.tar.gz) = 3f6a291a1c33c2725325ebc51ab8306e7a1e743b @@ -20,7 +20,7 @@ SHA1 (patch-bn) = 13e7b5e1c4c676fa0c42edf08bfa47d9fe67d708 SHA1 (patch-bo) = 3c11577df912d52361025d426a7ecc3cadfe6d79 SHA1 (patch-bp) = 5944c48114743a2771f3044beb84d767abe538df SHA1 (patch-bq) = 17523090fd787ce7f585060d49c92b0b1e64430e -SHA1 (patch-br) = 72e7b86a31851a437dff832206c8d96f263a6b15 +SHA1 (patch-br) = a4643910bdefcd9f10c991585ed2916877292dbb SHA1 (patch-bs) = ff8b504a8b8aedb49bdc27bffc50f58c5878c5c6 SHA1 (patch-bt) = 878e6723901f2f7e02416a2a7bbee0f2f4605af8 SHA1 (patch-bu) = ea10d9cafc9032bd9f50ea6b81cab58779f6890e @@ -32,3 +32,19 @@ SHA1 (patch-cp) = 0a43934c17d418e29588ef2ffb77ea1957133fc2 SHA1 (patch-cq) = 20ea8d36fe141481ed0b1cca3843ec7a16ff8720 SHA1 (patch-cr) = 8d90446f2760ed3dfd13cf7666b6978251ce6a68 SHA1 (patch-cs) = 433a1286d7483139d59ed25ac458b4a159fb17e3 +SHA1 (patch-ct) = 52dd5f46a91bf313627b9975f186aede822dc7eb +SHA1 (patch-cu) = 712496a2856bf03f7e60d3867e30d3f738829861 +SHA1 (patch-cv) = 678a36afcd35d1a24242157a23127ff5ad6dd8c4 +SHA1 (patch-cw) = 9cc60fdf9566a74d810d7d5d36cd44b3ecbfba14 +SHA1 (patch-cx) = 15945605065068af655ebf697691a82f4c027583 +SHA1 (patch-cy) = 4c1371c1f68af34cebffcc93e91065b119b30c42 +SHA1 (patch-cz) = 8df488621dbe452720fca277ca60c852a9b55433 +SHA1 (patch-da) = 7269e4e29288a5a2e4d5d33bb17b067b14ff007d +SHA1 (patch-db) = 8d82cc3825185c19441266f8d4a6860965a250ce +SHA1 (patch-dc) = b44f42f61e2c81813a0aa4b773ee1bbb6919c2a8 +SHA1 (patch-dd) = dc5ceed77ee5e0a871bc8ea75a5059297e5ec3e9 +SHA1 (patch-de) = 0dccfc915f66c5e35ac0858ebcf5ee85767300be +SHA1 (patch-df) = 176d2186b72c40334190d5635677104241c06e74 +SHA1 (patch-dg) = 5f3fe95a69cdf1d3eb13b4e2a3a3fce1f4c53168 +SHA1 (patch-dh) = ce1218fe7d82e3bb5c470cd74b334400aebd1928 +SHA1 (patch-di) = ab0fa75329575141844ff55698a21060c2b62e43 diff --git a/net/irrtoolset-nox11/patches/patch-br b/net/irrtoolset-nox11/patches/patch-br index d49f2d0f4b4..e1645e5eea0 100644 --- a/net/irrtoolset-nox11/patches/patch-br +++ b/net/irrtoolset-nox11/patches/patch-br @@ -1,6 +1,6 @@ -$NetBSD: patch-br,v 1.1 2005/03/06 11:40:21 spz Exp $ +$NetBSD: patch-br,v 1.2 2007/09/07 21:26:31 spz Exp $ ---- src/normalform/SetOfSymbol.cc.orig 2004-07-30 12:58:13.000000000 +0200 +--- src/normalform/SetOfSymbol.cc.orig 2006-06-08 17:16:26.000000000 +0200 +++ src/normalform/SetOfSymbol.cc @@ -51,7 +51,11 @@ // @@ -14,3 +14,12 @@ $NetBSD: patch-br,v 1.1 2005/03/06 11:40:21 spz Exp $ #include <cstdio> #include <cassert> #include "config.h" +@@ -271,7 +275,7 @@ void SetOfSymbol::operator = (const Set + + void SetOfSymbol::add(ASt as) { + char buffer[64]; +- sprintf(buffer, "AS%d", as); ++ asnum_string(buffer, as); + add(symbols.symID(buffer)); + } + diff --git a/net/irrtoolset-nox11/patches/patch-ct b/net/irrtoolset-nox11/patches/patch-ct new file mode 100644 index 00000000000..71253f7ff9a --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-ct @@ -0,0 +1,14 @@ +$NetBSD: patch-ct,v 1.1 2007/09/07 21:26:31 spz Exp $ + +--- src/rpsl/rpsl/rptype.cc.orig 2006-06-08 17:16:26.000000000 +0200 ++++ src/rpsl/rpsl/rptype.cc +@@ -388,8 +388,7 @@ bool RPTypeBoolean::validate(const Item + ////////////////////////////// RPTypeASNumber //////////////////// + + bool RPTypeASNumber::validate(const Item *item) const { +- return ((typeid(*item) == typeid(ItemASNO)) +- && ((ItemASNO *) item)->asno <= 65535); ++ return ((typeid(*item) == typeid(ItemASNO))); + } + + ////////////////////////////// RPTypeIPv4Address //////////////////// diff --git a/net/irrtoolset-nox11/patches/patch-cu b/net/irrtoolset-nox11/patches/patch-cu new file mode 100644 index 00000000000..29a70f0c055 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cu @@ -0,0 +1,14 @@ +$NetBSD: patch-cu,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/rpsl/rpsl/rpsl_item.hh.orig 2007-02-09 20:46:31.000000000 +0100 ++++ src/rpsl/rpsl/rpsl_item.hh +@@ -127,6 +127,9 @@ public: + && asno <= ((ItemASNO&) b).asno; + } + virtual Buffer *bufferize(Buffer *buf = NULL, bool lcase = false) const; ++ virtual const char *sprint(char *buf) { ++ asnum_string(buf, asno); ++ } + #ifdef DEBUG + virtual const char *className(void) const { + return "ItemASNO"; diff --git a/net/irrtoolset-nox11/patches/patch-cv b/net/irrtoolset-nox11/patches/patch-cv new file mode 100644 index 00000000000..837514b6d84 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cv @@ -0,0 +1,13 @@ +$NetBSD: patch-cv,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/rpsl/rpsl/rpsl.y.orig 2006-06-08 17:16:26.000000000 +0200 ++++ src/rpsl/rpsl/rpsl.y +@@ -755,7 +755,7 @@ tkn_word: TKN_WORD { + } + | TKN_ASNO { + char buffer[64]; +- sprintf(buffer, "AS%d", $1); ++ asnum_string(buffer, $1); + $$ = strdup(buffer); + } + | TKN_ASNAME { diff --git a/net/irrtoolset-nox11/patches/patch-cw b/net/irrtoolset-nox11/patches/patch-cw new file mode 100644 index 00000000000..711739bd056 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cw @@ -0,0 +1,25 @@ +$NetBSD: patch-cw,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/rpsl/rpsl/rpsl_item.cc.orig 2006-06-08 17:16:26.000000000 +0200 ++++ src/rpsl/rpsl/rpsl_item.cc +@@ -67,14 +67,18 @@ ostream &Item::print(ostream &out) const + } + + ostream &ItemASNO::print(ostream &out) const { +- out << "AS" << asno; ++ char buffer[64]; ++ asnum_string(buffer, asno); ++ out << "AS" << buffer; + return out; + } + + Buffer *ItemASNO::bufferize(Buffer *buf, bool lcase) const { ++ char buffer[64]; ++ asnum_string(buffer, asno); + if (!buf) + buf = new Buffer; +- buf->appendf("as%d", asno); ++ buf->appendf(buffer); + return buf; + } + diff --git a/net/irrtoolset-nox11/patches/patch-cx b/net/irrtoolset-nox11/patches/patch-cx new file mode 100644 index 00000000000..b79016ef63b --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cx @@ -0,0 +1,40 @@ +$NetBSD: patch-cx,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/irr/irr.cc.orig 2006-10-01 13:23:32.000000000 +0200 ++++ src/irr/irr.cc +@@ -312,7 +312,7 @@ const AutNum *IRR::getAutNum(ASt as) { + AutNum *result = NULL; + + if (! AutNumCache.query(as, result)) { +- sprintf(buffer, "AS%d", as); ++ asnum_string(buffer, as); + if (getAutNum(buffer, text, len)) { + Buffer b(text, len); + result = new AutNum(b); +@@ -365,7 +365,7 @@ void IRR::getRoute(Route *&route, Prefix + char *text; + int len; + +- sprintf(buffer, "AS%d", as); ++ asnum_string(buffer, as); + if (getRoute(rt->get_text(), buffer, text, len)) { + Buffer b(text, len); + route = new Route(b); +@@ -379,7 +379,7 @@ void IRR::getRoute(Route *&route, char * + char *text; + int len; + +- sprintf(buffer, "AS%d", as); ++ asnum_string(buffer, as); + if (getRoute(rt, buffer, text, len)) { + Buffer b(text, len); + route = new Route(b); +@@ -419,7 +419,7 @@ const MPPrefixRanges *IRR::expandAS(ASt + // we insert the set to the cache before expanding + // this is needed to avoid recursion if sets are recursively defined + expandASCache.add(as, result); +- sprintf(buffer, "AS%d", as); ++ asnum_string(buffer, as); + if (!expandAS(buffer, result)) { + expandASCache.nullify(as); + delete result; diff --git a/net/irrtoolset-nox11/patches/patch-cy b/net/irrtoolset-nox11/patches/patch-cy new file mode 100644 index 00000000000..10b13b0afbd --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cy @@ -0,0 +1,12 @@ +$NetBSD: patch-cy,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/irr/irr.hh.orig 2006-06-08 17:16:26.000000000 +0200 ++++ src/irr/irr.hh +@@ -59,6 +59,7 @@ + #include "gnug++/SetOfUInt.hh" + #include "gnu/prefixranges.hh" + #include "rpsl/prefix.hh" ++#include "rpsl/rpsl_asnum.hh" + #include "classes.hh" + + class AutNum; diff --git a/net/irrtoolset-nox11/patches/patch-cz b/net/irrtoolset-nox11/patches/patch-cz new file mode 100644 index 00000000000..93d6e1ac0cc --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-cz @@ -0,0 +1,18 @@ +$NetBSD: patch-cz,v 1.1 2007/09/07 21:26:32 spz Exp $ + +--- src/rpsl/rpsl/rpsl_asnum.hh.orig 2007-09-07 22:05:27.000000000 +0200 ++++ src/rpsl/rpsl/rpsl_asnum.hh +@@ -0,0 +1,13 @@ ++#ifndef ASNUM_HH ++#define ASNUM_HH 1 ++ ++inline int asnum_string(char *buf, unsigned int asno) ++{ ++ if (asno > 65535) ++ return sprintf(buf, "AS%d.%d", asno>>16, asno&0xffff); ++ else ++ return sprintf(buf, "AS%d", asno); ++} ++ ++#endif ++ diff --git a/net/irrtoolset-nox11/patches/patch-da b/net/irrtoolset-nox11/patches/patch-da new file mode 100644 index 00000000000..1fb34655ba7 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-da @@ -0,0 +1,33 @@ +$NetBSD: patch-da,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/aoe/aoe.cc.orig 2002-04-09 13:48:46.000000000 +0200 ++++ src/aoe/aoe.cc +@@ -275,7 +275,7 @@ TclList &operator<<(TclList &tl, List<AS + pcASPeer; + pcASPeer = lh.next(pcASPeer)) + { +- sprintf(pzcASPeerNo, "AS%d", pcASPeer->getNo()); ++ asnum_string(pzcASPeerNo, pcASPeer->getNo()); + switch (pcASPeer->getType()) + { + case dASPeerFromIRR: +@@ -662,8 +662,8 @@ int ListPeer::command(int argc, char *ar + ASt tPeerAS = pcApp->getASPeerNo(iPeerASIndex); + + char pzcMyAS[16], pzcPeerAS[16]; +- sprintf(pzcMyAS, "AS%d", tMyAS); +- sprintf(pzcPeerAS, "AS%d", tPeerAS); ++ asnum_string(pzcMyAS, tMyAS); ++ asnum_string(pzcPeerAS, tPeerAS); + + // Setup $PeerAS properly + if (!pcApp->evalf("set PeerAS %s", pzcPeerAS)) return TCL_ERROR; +@@ -1093,7 +1093,7 @@ AoeApplication::AoeApplication(char *pzc + pcPolicyShowButton(NULL), + pcStatusLine(NULL) + { +- sprintf(pzcASNo, "AS%d", tASNo); ++ asnum_string(pzcASNo, tASNo); + if (!(pcIrr = IRR::newClient())) + { + usage(); diff --git a/net/irrtoolset-nox11/patches/patch-db b/net/irrtoolset-nox11/patches/patch-db new file mode 100644 index 00000000000..8eda950e2de --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-db @@ -0,0 +1,23 @@ +$NetBSD: patch-db,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/aoe/bgp_aspath.cc.orig 2002-04-09 13:48:46.000000000 +0200 ++++ src/aoe/bgp_aspath.cc +@@ -110,11 +110,15 @@ void BgpASPath::print(void) + pcFirstAndLastAS; + pcFirstAndLastAS = cFirstAndLastASes.next(pcFirstAndLastAS)) + { +- printf("AS%d --", pcFirstAndLastAS->getFirst()); ++ char buf[64]; ++ asnum_string(buf, pcFirstAndLastAS->getFirst()); ++ printf("%s --", buf); + for (int i = pcFirstAndLastAS->getLast().first(); + i >= 0; +- i = pcFirstAndLastAS->getLast().next(i)) +- printf(" AS%d", i); ++ i = pcFirstAndLastAS->getLast().next(i)) { ++ asnum_string(buf, i); ++ printf(" %s", buf); ++ } + printf("\n"); + } + } diff --git a/net/irrtoolset-nox11/patches/patch-dc b/net/irrtoolset-nox11/patches/patch-dc new file mode 100644 index 00000000000..024c8832ed0 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-dc @@ -0,0 +1,50 @@ +$NetBSD: patch-dc,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/roe/schedule.cc.orig 2002-04-09 13:48:48.000000000 +0200 ++++ src/roe/schedule.cc +@@ -177,7 +177,8 @@ void Schedule::add_selected(char *select + for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { + r = routelist(atoi(s)); + +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + tcl_Eval("set ROUTE %s", r->route.get_text(buffer)); + tcl_Eval("set DATE %s", configure.date); + tcl_Eval("subst \"%s\"", configure.add_template); +@@ -190,6 +191,7 @@ void Schedule::del_selected(char *select + RouteList::Route *r; + RouteList::Route::db_as *p; + Route *route = NULL; ++ char buffer[64]; + + for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { + r = routelist(atoi(s)); +@@ -213,7 +215,8 @@ void Schedule::del_selected(char *select + // Modified by wlee@isi.edu + // if (code) + if (route) { +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + tcl_Eval("set ROUTE %s", r->route.get_text()); + tcl_Eval("set DATE %s", configure.date); + tcl_Eval("subst \"%.*s%s\"", +@@ -231,6 +234,7 @@ void Schedule::del_selected_matching_sou + RouteList::Route *r; + RouteList::Route::db_as *p; + Route *route = NULL; ++ char buffer[64]; + + for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { + r = routelist(atoi(s)); +@@ -254,7 +258,8 @@ void Schedule::del_selected_matching_sou + + // Modified by wlee@isi.edu + if (route) { +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + tcl_Eval("set ROUTE %s", r->route.get_text()); + tcl_Eval("set DATE %s", configure.date); + tcl_Eval("subst \"%.*s%s\"", diff --git a/net/irrtoolset-nox11/patches/patch-dd b/net/irrtoolset-nox11/patches/patch-dd new file mode 100644 index 00000000000..da0b9e82f37 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-dd @@ -0,0 +1,45 @@ +$NetBSD: patch-dd,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/roe/route-list.cc.orig 2002-06-18 13:00:11.000000000 +0200 ++++ src/roe/route-list.cc +@@ -67,6 +67,7 @@ extern IRR *RLWhois; + + char *RouteList::format(RouteList::Route *vr) { + static char line[256]; ++ char buf[64]; + char *c; + + for (c = line; c < line + vr->indentation; ++c) +@@ -108,8 +109,10 @@ char *RouteList::format(RouteList::Route + strcat(line, " "); + + RouteList::Route::db_as* p; +- for (p = vr->db_as_l.head(); p; p = vr->db_as_l.next(p)) +- sprintf(line + strlen(line), " %s:AS%d", p->db, p->as); ++ for (p = vr->db_as_l.head(); p; p = vr->db_as_l.next(p)) { ++ asnum_string(buf, p->as); ++ sprintf(line + strlen(line), " %s:%s", p->db, buf); ++ } + + return line; + } +@@ -497,13 +500,17 @@ void RouteList::load(ASt _as) { + const PrefixRanges *registered_routes = whois->expandAS(as); + + if (!registered_routes) { +- tcl_Eval("showWarning { No object for AS%d}", as); ++ char buf[64]; ++ asnum_string(buf, as); ++ tcl_Eval("showWarning { No object for %s}", buf); + return; + } + + // Added by wlee + if (registered_routes->isEmpty()) { +- tcl_Eval("showWarning { No route for AS%d}", as); ++ char buf[64]; ++ asnum_string(buf, as); ++ tcl_Eval("showWarning { No route for %s}", buf); + return; + } + diff --git a/net/irrtoolset-nox11/patches/patch-de b/net/irrtoolset-nox11/patches/patch-de new file mode 100644 index 00000000000..dc4a109899d --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-de @@ -0,0 +1,34 @@ +$NetBSD: patch-de,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/roe/object.cc.orig 2002-04-09 13:48:48.000000000 +0200 ++++ src/roe/object.cc +@@ -107,7 +107,8 @@ void RoeObject::del(int index) { + RouteList::Route *vr = routelist(index); + + // Modified by wlee@isi.edu +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + // tcl_Eval("set AS %s", routelist.as); + tcl_Eval("set ROUTE %s", vr->route.get_text(buffer)); + tcl_Eval("set DATE %s", configure.date); +@@ -123,7 +124,8 @@ void RoeObject::add(int index) { + RouteList::Route *vr = routelist(index); + + // Modified by wlee@isi.edu +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + // tcl_Eval("set AS %s", routelist.as); + tcl_Eval("set ROUTE %s", vr->route.get_text(buffer)); + tcl_Eval("set DATE %s", configure.date); +@@ -140,7 +142,8 @@ void RoeObject::upd(int index) { + RouteList::Route *vr = routelist(index); + + // Modified by wlee@isi.edu +- tcl_Eval("set AS AS%d", routelist.as); ++ asnum_string(buffer, routelist.as); ++ tcl_Eval("set AS %s", buffer); + // tcl_Eval("set AS %s", routelist.as); + tcl_Eval("set ROUTE %s", vr->route.get_text(buffer)); + tcl_Eval("set DATE %s", configure.date); diff --git a/net/irrtoolset-nox11/patches/patch-df b/net/irrtoolset-nox11/patches/patch-df new file mode 100644 index 00000000000..ff1f06737f7 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-df @@ -0,0 +1,40 @@ +$NetBSD: patch-df,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/prtraceroute/prtraceroute.cc.orig 2002-04-09 13:48:47.000000000 +0200 ++++ src/prtraceroute/prtraceroute.cc +@@ -171,6 +171,7 @@ main (int argc, char **argv, char **envp + ICMPProbeReply reply; // wait for incoming icmp's + Timer t1, t2; + int ttl, got_there = 0, unreachable = 0; ++ char buf[64]; + + printf ("prtraceroute to %s (%s), %d hops max, %d byte packets\n", + dst, dstip->getIpaddr(), max_ttl, datalen); +@@ -192,7 +193,8 @@ main (int argc, char **argv, char **envp + ipAddr *ipaddr = new ipAddr (newaddr); + if (policy_flag) { + path.addHop(ipaddr, ttl); +- printf (" [AS%d]", path.getHopAS(ttl)); ++ asnum_string(buf, path.getHopAS(ttl)); ++ printf (" [%s]", buf); + } + if (!nflag) { + printf (" %s (%s)", ipaddr->getName(), +@@ -690,6 +692,7 @@ Path::process_policies() { + const AutNum * autnum; + + char test[80]; ++ char buf[64]; + + actiondictionary = new ActionDictionary; + +@@ -796,7 +799,8 @@ Path::process_policies() { + for (i = last_ttl; i >= 0; i--) { + if (hops[i] != NULL) { + //cout << i << " AS" << getHopAS(i) << " "; +- printf ("%3d AS%d", i, getHopAS(i)); ++ asnum_string(buf, getHopAS(i)); ++ printf ("%3d %s", i, buf); + if (nflag) // XXX, this is a global, and is bad!!! + //cout << hops[i]->ipaddr->getIpaddr(); + printf (" %-35s", hops[i]->ipaddr->getIpaddr()); diff --git a/net/irrtoolset-nox11/patches/patch-dg b/net/irrtoolset-nox11/patches/patch-dg new file mode 100644 index 00000000000..afca7a7082c --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-dg @@ -0,0 +1,30 @@ +$NetBSD: patch-dg,v 1.1 2007/09/07 21:26:33 spz Exp $ + +--- src/rpsl/rpsl/symbols.hh.orig 2002-04-09 13:48:49.000000000 +0200 ++++ src/rpsl/rpsl/symbols.hh +@@ -58,6 +58,7 @@ + #include "util/Allocator.hh" + #include "gnu/SetOfSymID.hh" + #include "util/xstring.h" ++#include "rpsl/rpsl_asnum.hh" + #include <cstdio> + + typedef unsigned int ASt; +@@ -114,7 +115,7 @@ public: + } + + SymID resolvePeerAS(SymID sid, ASt peerAS) { +- char *buffer = (char *) malloc(strlen(sid) * 2); ++ char *buffer = (char *) malloc(strlen(sid) * 3); + char *head, *tail, *ptr; + int written; + ptr = buffer; +@@ -123,7 +124,7 @@ public: + tail = head + 6, head++, head = strstr(head, "PEERAS")) { + strncpy(ptr, tail, head - tail); + ptr += (head - tail); +- sprintf(ptr, "AS%d", peerAS); ++ asnum_string(ptr, peerAS); + written = strlen(ptr); + ptr += written; + } diff --git a/net/irrtoolset-nox11/patches/patch-dh b/net/irrtoolset-nox11/patches/patch-dh new file mode 100644 index 00000000000..b7f34915765 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-dh @@ -0,0 +1,35 @@ +$NetBSD: patch-dh,v 1.1 2007/09/07 21:26:34 spz Exp $ + +--- src/rpsl/rpsl/rpsl.l.orig 2006-10-01 13:23:32.000000000 +0200 ++++ src/rpsl/rpsl/rpsl.l +@@ -74,7 +74,7 @@ INT [[:digit:]]+ + SINT [+-]?{INT} + REAL [+-]?{INT}?\.{INT}({WS}*E{WS}*[+-]?{INT})? + NAME [[:alpha:]]([[:alnum:]_-]*[[:alnum:]])? +-ASNO AS{INT} ++ASNO AS{INT}\.{INT}|AS{INT} + ASNAME AS-[[:alnum:]_-]*[[:alnum:]] + RSNAME RS-[[:alnum:]_-]*[[:alnum:]] + RTRSNAME RTRS-[[:alnum:]_-]*[[:alnum:]] +@@ -455,7 +455,11 @@ extern void atollRA(...); + + /* The order of these rules are important */ + {ASNO} { +- yylval.i = atoi(yytext+2); ++ const char *dot = strchr(yytext,'.'); ++ if (dot) ++ yylval.i = atoi(yytext+2)<<16 | atoi(dot+1); ++ else ++ yylval.i = atoi(yytext+2); + LEXER_RETURN(TKN_ASNO); + } + +@@ -751,7 +755,7 @@ void yy_scan_object(Object *o) { + + if (rpsl_buffer) + yy_delete_buffer(rpsl_buffer); +- rpsl_buffer = yy_scan_bytes(o->contents, o->size); ++ rpsl_buffer = yy_scan_bytes(o->contents, (yy_size_t)o->size); + BEGIN(INITIAL); + } + diff --git a/net/irrtoolset-nox11/patches/patch-di b/net/irrtoolset-nox11/patches/patch-di new file mode 100644 index 00000000000..745523fdf33 --- /dev/null +++ b/net/irrtoolset-nox11/patches/patch-di @@ -0,0 +1,17 @@ +$NetBSD: patch-di,v 1.1 2007/09/07 21:26:34 spz Exp $ + +--- src/irr/birdwhoisc.cc.orig 2007-09-07 22:15:31.000000000 +0200 ++++ src/irr/birdwhoisc.cc +@@ -429,7 +429,11 @@ int BirdWhoisClient::getSourceOrigin(cha + AttrGenericIterator<ItemASNO> itrOrigin(itrObject, "origin"); + AttrGenericIterator<ItemWORD> itrSource(itrObject, "source"); + if (itrOrigin && itrSource) +- cBuffer.append("%s AS%d\n", itrSource()->word, itrOrigin()->asno); ++ { ++ char buf[64]; ++ asnum_string(buf, itrOrigin()->asno); ++ cBuffer.append("%s %s\n", itrSource()->word, buf); ++ } + } + } + if (cBuffer.empty()) |