head 1.5; access; symbols OPENPKG_E1_MP_HEAD:1.5 OPENPKG_E1_MP:1.5 OPENPKG_E1_MP_2_STABLE:1.5.8.2 OPENPKG_E1_FP:1.5.8.2 OPENPKG_2_STABLE_MP:1.5 OPENPKG_2_STABLE_20061018:1.5.8.2 OPENPKG_2_STABLE:1.5.0.8 OPENPKG_2_5_RELEASE:1.5 OPENPKG_2_5_SOLID:1.5.0.6 OPENPKG_2_5_SOLID_BP:1.5 OPENPKG_2_4_RELEASE:1.5 OPENPKG_2_4_SOLID:1.5.0.4 OPENPKG_2_4_SOLID_BP:1.5 OPENPKG_CW_FP:1.5 OPENPKG_2_3_RELEASE:1.5 OPENPKG_2_3_SOLID:1.5.0.2 OPENPKG_2_3_SOLID_BP:1.5; locks; strict; comment @# @; 1.5 date 2005.02.16.19.49.26; author ms; state Exp; branches 1.5.8.1; next 1.4; 1.4 date 2005.01.05.15.25.19; author ms; state Exp; branches; next 1.3; 1.3 date 2003.12.11.16.25.24; author ms; state Exp; branches; next 1.2; 1.2 date 2003.12.09.17.42.54; author ms; state Exp; branches; next 1.1; 1.1 date 2003.11.27.19.53.56; author rse; state Exp; branches; next ; 1.5.8.1 date 2005.02.16.19.49.26; author rse; state dead; branches; next 1.5.8.2; commitid iZxwRSmmWscPXUQr; 1.5.8.2 date 2006.10.16.14.55.45; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.5 log @port to FreeBSD 5.3 by removing unused and conflicting identifier names inet_pton(3) and inet_ntop(3) @ text @Index: modules/sk/sk_socket.c diff -Nau modules/sk/sk_socket.c.orig modules/sk/sk_socket.c --- modules/sk/sk_socket.c.orig Thu Jul 3 09:55:41 2003 +++ modules/sk/sk_socket.c Tue Dec 9 15:51:05 2003 @@@@ -65,7 +65,9 @@@@ #ifdef __linux__ if(getservbyname_r(service, proto, &result, buffer, sizeof(buffer), &serv) < 0) serv = NULL; -#else +#elif defined(__FreeBSD__) + serv = getservbyname(service, proto); +#else serv = getservbyname_r(service, proto, &result, buffer, sizeof(buffer)); #endif @@@@ -261,6 +263,9 @@@@ #ifdef __linux__ er = (gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &hp, &error) < 0 ); +#elif defined(__FreeBSD__) + hp = gethostbyname(hostname); + er = ( hp == NULL ); #else /* default is Solaris implementation */ hp = gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &error); Index: modules/ud/ud_main.c diff -Nau modules/ud/ud_main.c.orig modules/ud/ud_main.c --- modules/ud/ud_main.c.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_main.c Tue Dec 9 15:51:05 2003 @@@@ -120,6 +120,8 @@@@ } #ifdef __linux__ if(gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &hptr, &error)<0) hptr=NULL; +#elif defined(__FreeBSD__) + hptr=gethostbyname(nrtm->server); #else/* default is Solaris implementation */ hptr=gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &error); #endif Index: modules/qi/query_instructions.h diff -Nau modules/qi/query_instructions.h.orig modules/qi/query_instructions.h --- modules/qi/query_instructions.h.orig 2005-01-05 13:34:01 +0100 +++ modules/qi/query_instructions.h 2005-01-05 13:34:21 +0100 @@@@ -92,7 +92,7 @@@@ -#define Q_REC "INSERT INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id" +#define Q_REC "INSERT IGNORE INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id" #if 0 #define Q_NO_OBJECTS "SELECT object_id, sequence_id, object FROM last WHERE object_id = 0" Index: Makefile.site.in diff -Nau Makefile.site.in.orig Makefile.site.in --- Makefile.site.in.orig Wed Jul 30 10:17:29 2003 +++ Makefile.site.in Tue Dec 9 15:51:05 2003 @@@@ -67,5 +67,5 @@@@ CFLAGS = @@LDFLAGS@@ @@CFLAGS@@ -g $(INCLUDES) $(DEFINES) @@XMLCFLAGS@@ @@XSLTCFLAGS@@ LFLAGS = @@LDFLAGS@@ @@CFLAGS@@ -g -L$(RIPLIBDIR) -L$(MYSQLLIBDIR) -LIBS = `$(GLIBCONF) --libs gthread` -lmysqlclient_r -lm $(ACLIBS) $(CCLIENTLIBDIR)/c-client.a @@XMLLIBS@@ @@XSLTLIBS@@ +LIBS = `$(GLIBCONF) --libs gthread` -lmysqlclient_r -lm $(ACLIBS) $(CCLIENTLIBDIR)/libimap.a -lssl -lcrypto @@XMLLIBS@@ @@XSLTLIBS@@ Index: configure diff -Nau configure.orig configure --- configure.orig Tue Jul 29 11:45:09 2003 +++ configure Tue Dec 9 15:51:05 2003 @@@@ -1311,20 +1311,20 @@@@ topdir=$prefix bindir=${topdir}/bin -confdir=${topdir}/conf -scriptdir=${topdir}/scripts -utildir=${topdir}/utils -docdir=${topdir}/doc -vardir=${topdir}/var +confdir=${topdir}/etc/ripe-dbase +scriptdir=${topdir}/libexec/ripe-dbase +utildir=${topdir}/libexec/ripe-dbase +docdir=${topdir}/share/ripe-dbase +vardir=${topdir}/var/ripe-dbase tmpdir=${vardir}/tmp -lockdir=${vardir}/lock +lockdir=${vardir}/run -libdir=${topdir}/lib/gnudl +libdir=${topdir}/lib/ripe-dbase mandir=${topdir}/man/man1 ####### # Log infrastructure -logdir=${topdir}/log +logdir=${topdir}/var/ripe-dbase/log qrylog=${logdir}/qry dbuperr=${logdir}/dbuperr allriperr=${logdir}/riperr @@@@ -1490,9 +1490,9 @@@@ mysqllibdir=$mysql/lib fi; -as_ac_File=`echo "ac_cv_file_$mysqllibdir/libmysqlclient_r.so" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $mysqllibdir/libmysqlclient_r.so" >&5 -echo $ECHO_N "checking for $mysqllibdir/libmysqlclient_r.so... $ECHO_C" >&6 +as_ac_File=`echo "ac_cv_file_$mysqllibdir/libmysqlclient_r.a" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $mysqllibdir/libmysqlclient_r.a" >&5 +echo $ECHO_N "checking for $mysqllibdir/libmysqlclient_r.a $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@@ -1500,7 +1500,7 @@@@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "$mysqllibdir/libmysqlclient_r.so"; then +if test -r "$mysqllibdir/libmysqlclient_r.a"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@@@ -1511,7 +1511,7 @@@@ if test `eval echo '${'$as_ac_File'}'` = yes; then : else - echo "MySQL library directory does not contain libmysqlclient_r.so !"; + echo "MySQL library directory does not contain libmysqlclient_r.a !"; echo "Please specify a suitable MySQL library directory: --with-mysqllib=DIR"; exit 1 fi @@@@ -1705,9 +1705,9 @@@@ fi -as_ac_File=`echo "ac_cv_file_$cclientlib/c-client.a" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $cclientlib/c-client.a" >&5 -echo $ECHO_N "checking for $cclientlib/c-client.a... $ECHO_C" >&6 +as_ac_File=`echo "ac_cv_file_$cclientlib/libimap" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $cclientlib/libimap.a" >&5 +echo $ECHO_N "checking for $cclientlib/libimap.a... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@@ -1715,7 +1715,7 @@@@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "$cclientlib/c-client.a"; then +if test -r "$cclientlib/libimap.a"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@@@ -1726,7 +1726,7 @@@@ if test `eval echo '${'$as_ac_File'}'` = yes; then : else - echo "c-client lib directory does not contain c-client.a !"; + echo "c-client lib directory does not contain libimap.a !"; echo "Please specify a suitable c-client library directory: --with-cclientlib=DIR"; exit 1 fi Index: modules/ip/inet_ntop.c --- modules/ip/inet_ntop.c.orig 2005-02-16 20:34:26 +0100 +++ modules/ip/inet_ntop.c 2005-02-16 20:34:30 +0100 @@@@ -29,7 +29,6 @@@@ #include #include #include -#include #include #include Index: modules/ip/inet_pton.c --- modules/ip/inet_pton.c.orig 2000-12-27 17:07:07 +0100 +++ modules/ip/inet_pton.c 2005-02-16 20:36:54 +0100 @@@@ -32,7 +32,6 @@@@ #include #include #include -#include #include #include @ 1.5.8.1 log @file ripe-dbase.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:55:45 +0000 @ text @d1 179 @ 1.5.8.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 179 Index: modules/sk/sk_socket.c diff -Nau modules/sk/sk_socket.c.orig modules/sk/sk_socket.c --- modules/sk/sk_socket.c.orig Thu Jul 3 09:55:41 2003 +++ modules/sk/sk_socket.c Tue Dec 9 15:51:05 2003 @@@@ -65,7 +65,9 @@@@ #ifdef __linux__ if(getservbyname_r(service, proto, &result, buffer, sizeof(buffer), &serv) < 0) serv = NULL; -#else +#elif defined(__FreeBSD__) + serv = getservbyname(service, proto); +#else serv = getservbyname_r(service, proto, &result, buffer, sizeof(buffer)); #endif @@@@ -261,6 +263,9 @@@@ #ifdef __linux__ er = (gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &hp, &error) < 0 ); +#elif defined(__FreeBSD__) + hp = gethostbyname(hostname); + er = ( hp == NULL ); #else /* default is Solaris implementation */ hp = gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &error); Index: modules/ud/ud_main.c diff -Nau modules/ud/ud_main.c.orig modules/ud/ud_main.c --- modules/ud/ud_main.c.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_main.c Tue Dec 9 15:51:05 2003 @@@@ -120,6 +120,8 @@@@ } #ifdef __linux__ if(gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &hptr, &error)<0) hptr=NULL; +#elif defined(__FreeBSD__) + hptr=gethostbyname(nrtm->server); #else/* default is Solaris implementation */ hptr=gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &error); #endif Index: modules/qi/query_instructions.h diff -Nau modules/qi/query_instructions.h.orig modules/qi/query_instructions.h --- modules/qi/query_instructions.h.orig 2005-01-05 13:34:01 +0100 +++ modules/qi/query_instructions.h 2005-01-05 13:34:21 +0100 @@@@ -92,7 +92,7 @@@@ -#define Q_REC "INSERT INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id" +#define Q_REC "INSERT IGNORE INTO %s SELECT pe_ro_id FROM %s IDS STRAIGHT_JOIN %s WHERE object_id = IDS.id" #if 0 #define Q_NO_OBJECTS "SELECT object_id, sequence_id, object FROM last WHERE object_id = 0" Index: Makefile.site.in diff -Nau Makefile.site.in.orig Makefile.site.in --- Makefile.site.in.orig Wed Jul 30 10:17:29 2003 +++ Makefile.site.in Tue Dec 9 15:51:05 2003 @@@@ -67,5 +67,5 @@@@ CFLAGS = @@LDFLAGS@@ @@CFLAGS@@ -g $(INCLUDES) $(DEFINES) @@XMLCFLAGS@@ @@XSLTCFLAGS@@ LFLAGS = @@LDFLAGS@@ @@CFLAGS@@ -g -L$(RIPLIBDIR) -L$(MYSQLLIBDIR) -LIBS = `$(GLIBCONF) --libs gthread` -lmysqlclient_r -lm $(ACLIBS) $(CCLIENTLIBDIR)/c-client.a @@XMLLIBS@@ @@XSLTLIBS@@ +LIBS = `$(GLIBCONF) --libs gthread` -lmysqlclient_r -lm $(ACLIBS) $(CCLIENTLIBDIR)/libimap.a -lssl -lcrypto @@XMLLIBS@@ @@XSLTLIBS@@ Index: configure diff -Nau configure.orig configure --- configure.orig Tue Jul 29 11:45:09 2003 +++ configure Tue Dec 9 15:51:05 2003 @@@@ -1311,20 +1311,20 @@@@ topdir=$prefix bindir=${topdir}/bin -confdir=${topdir}/conf -scriptdir=${topdir}/scripts -utildir=${topdir}/utils -docdir=${topdir}/doc -vardir=${topdir}/var +confdir=${topdir}/etc/ripe-dbase +scriptdir=${topdir}/libexec/ripe-dbase +utildir=${topdir}/libexec/ripe-dbase +docdir=${topdir}/share/ripe-dbase +vardir=${topdir}/var/ripe-dbase tmpdir=${vardir}/tmp -lockdir=${vardir}/lock +lockdir=${vardir}/run -libdir=${topdir}/lib/gnudl +libdir=${topdir}/lib/ripe-dbase mandir=${topdir}/man/man1 ####### # Log infrastructure -logdir=${topdir}/log +logdir=${topdir}/var/ripe-dbase/log qrylog=${logdir}/qry dbuperr=${logdir}/dbuperr allriperr=${logdir}/riperr @@@@ -1490,9 +1490,9 @@@@ mysqllibdir=$mysql/lib fi; -as_ac_File=`echo "ac_cv_file_$mysqllibdir/libmysqlclient_r.so" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $mysqllibdir/libmysqlclient_r.so" >&5 -echo $ECHO_N "checking for $mysqllibdir/libmysqlclient_r.so... $ECHO_C" >&6 +as_ac_File=`echo "ac_cv_file_$mysqllibdir/libmysqlclient_r.a" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $mysqllibdir/libmysqlclient_r.a" >&5 +echo $ECHO_N "checking for $mysqllibdir/libmysqlclient_r.a $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@@ -1500,7 +1500,7 @@@@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "$mysqllibdir/libmysqlclient_r.so"; then +if test -r "$mysqllibdir/libmysqlclient_r.a"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@@@ -1511,7 +1511,7 @@@@ if test `eval echo '${'$as_ac_File'}'` = yes; then : else - echo "MySQL library directory does not contain libmysqlclient_r.so !"; + echo "MySQL library directory does not contain libmysqlclient_r.a !"; echo "Please specify a suitable MySQL library directory: --with-mysqllib=DIR"; exit 1 fi @@@@ -1705,9 +1705,9 @@@@ fi -as_ac_File=`echo "ac_cv_file_$cclientlib/c-client.a" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $cclientlib/c-client.a" >&5 -echo $ECHO_N "checking for $cclientlib/c-client.a... $ECHO_C" >&6 +as_ac_File=`echo "ac_cv_file_$cclientlib/libimap" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $cclientlib/libimap.a" >&5 +echo $ECHO_N "checking for $cclientlib/libimap.a... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@@ -1715,7 +1715,7 @@@@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "$cclientlib/c-client.a"; then +if test -r "$cclientlib/libimap.a"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@@@ -1726,7 +1726,7 @@@@ if test `eval echo '${'$as_ac_File'}'` = yes; then : else - echo "c-client lib directory does not contain c-client.a !"; + echo "c-client lib directory does not contain libimap.a !"; echo "Please specify a suitable c-client library directory: --with-cclientlib=DIR"; exit 1 fi Index: modules/ip/inet_ntop.c --- modules/ip/inet_ntop.c.orig 2005-02-16 20:34:26 +0100 +++ modules/ip/inet_ntop.c 2005-02-16 20:34:30 +0100 @@@@ -29,7 +29,6 @@@@ #include #include #include -#include #include #include Index: modules/ip/inet_pton.c --- modules/ip/inet_pton.c.orig 2000-12-27 17:07:07 +0100 +++ modules/ip/inet_pton.c 2005-02-16 20:36:54 +0100 @@@@ -32,7 +32,6 @@@@ #include #include #include -#include #include #include @ 1.4 log @duplicate primary keys are generated by STRAIGHT_JOIN selections, so work around subsequent broken sql INSERT logic with IGNORE to allow for MySQL's 4.1.X more strict (ISO standard?) database operations @ text @d158 22 @ 1.3 log @add log file rotation, and back out Arnd patchcode @ text @d39 13 @ 1.2 log @adapt older version 3.1 patch code to current version 3.2 sources @ text @a0 153 The patch code for ripe-dbase version 3.1 was written by Arnd VEHLING, under contract by Cable & Wireless. This particular patch was taken from Arnd's patch, and reformatted and reviewed for ripe-dbase version 3.2 by Michael Schloh von Bennewitz. Index: modules/df/defs.c diff -Nau modules/df/defs.c.orig modules/df/defs.c --- modules/df/defs.c.orig Tue Dec 9 15:59:53 2003 +++ modules/df/defs.c Tue Dec 9 16:02:05 2003 @@@@ -78,6 +78,11 @@@@ "peering-set", "rtr-set", "irt", + "reg-id", + "facility", + "ticket", + "range", + "purpose", NULL }; /* Filter_names */ @@@@ -131,6 +136,11 @@@@ "peering_set", "rtr_set", "irt", +"reg_id", +"pop", +"ticket", +"range", +"purpose", NULL }; Index: modules/df/defs.h diff -Nau modules/df/defs.h.orig modules/df/defs.h --- modules/df/defs.h.orig Tue Dec 9 16:03:09 2003 +++ modules/df/defs.h Tue Dec 9 16:03:39 2003 @@@@ -92,6 +92,10 @@@@ UD_AX_MR, UD_AX_MU, UD_AX_IT, + UD_AX_AX, + UD_AX_RG, + UD_AX_PP, + UD_AX_PU, UD_LEAF_, UD_LF_IF, UD_LF_RF, Index: modules/qc/query_command.c diff -Nau modules/qc/query_command.c.orig modules/qc/query_command.c --- modules/qc/query_command.c.orig Thu Jul 3 09:55:33 2003 +++ modules/qc/query_command.c Tue Dec 9 16:52:06 2003 @@@@ -829,7 +829,8 @@@@ is_ip_key = MA_isset(query_command->keytypes_bitmap, WK_IPADDRESS) || MA_isset(query_command->keytypes_bitmap, WK_IPRANGE) || MA_isset(query_command->keytypes_bitmap, WK_IPPREFIX) || - MA_isset(query_command->keytypes_bitmap, WK_IP6PREFIX); + MA_isset(query_command->keytypes_bitmap, WK_IP6PREFIX) || + MA_isset(query_command->keytypes_bitmap, WK_RANGE); /* check for use of IP flags on non-IP lookups */ if ((ip_flag_used || query_command->d) && !is_ip_key) { Index: modules/qi/query_instructions.c diff -Nau modules/qi/query_instructions.c.orig modules/qi/query_instructions.c --- modules/qi/query_instructions.c.orig Thu Jul 3 09:55:34 2003 +++ modules/qi/query_instructions.c Tue Dec 9 17:09:53 2003 @@@@ -396,7 +396,7 @@@@ create_name_query(result_buff, q.query, qc->keys); addquery = 1; } - else if( q.keytype == WK_IPADDRESS ) { /* ifaddr sql lookups */ + else if( q.keytype == WK_IPADDRESS || q.keytype == WK_RANGE ) { /* ifaddr sql lookups */ ip_range_t myrang; unsigned begin, end; ip_keytype_t key_type; @@@@ -2103,6 +2103,11 @@@@ ++++++++++++++++++++++++++++++++++++++*/ static int valid_query(const Query_command *qc, const Query_t q) { int result=0; + + if (q.keytype == WK_REGID || q.keytype == WK_POP || + q.keytype == WK_TICKET|| q.keytype == WK_RANGE || + q.keytype == WK_PURPOSE) + return 1; if (MA_isset(qc->keytypes_bitmap, q.keytype) == 1) { if (q.query != NULL) { Index: modules/rp/rp_convert.c diff -Nau modules/rp/rp_convert.c.orig modules/rp/rp_convert.c --- modules/rp/rp_convert.c.orig Tue Dec 9 17:12:53 2003 +++ modules/rp/rp_convert.c Tue Dec 9 17:13:04 2003 @@@@ -70,6 +70,7 @@@@ int conv; rx_fam_t fam_id = RP_attr2fam( attr ); switch( attr ) { + case A_RA: case A_IN: conv = IP_rang_e2b(&(uni->u.in), astr); break; Index: modules/rp/rp_load.c diff -Nau modules/rp/rp_load.c.orig modules/rp/rp_load.c --- modules/rp/rp_load.c.orig Thu Jul 3 09:55:36 2003 +++ modules/rp/rp_load.c Tue Dec 9 17:19:31 2003 @@@@ -61,6 +61,7 @@@@ pack->type = attr; pack->d.origin = NULL; switch( attr ) { + case A_RA: case A_IN: /* read 0-2 from inetnum @@@@ -160,7 +161,7 @@@@ dieif( vu == NULL /* loading query undefined */ ); #if 0 - if( attr==A_IN && space==IP_V4 ) { + if( ( attr==A_IN || attr==A_RA ) && space==IP_V4 ) { vu = "SELECT object_id,begin_in,end_in FROM inetnum WHERE thread_id = 0 AND begin_in >= 3238002688 AND end_in < 3254779904 "; } #endif @@@@ -254,7 +255,7 @@@@ dieif ( SQ_execute_query(con, "LOCK TABLES " "route READ, inetnum READ, inet6num READ, " - "inaddr_arpa READ, domain READ, ip6int READ ", + "inaddr_arpa READ, domain READ, ip6int READ, range READ ", NULL) == -1 ); do { @@@@ -277,6 +278,9 @@@@ break; } #endif + if( !NOERR(err=RP_sql_load_attr_space( A_RA, IP_V4, reg_id, con))) { + break; + } /* CONSTCOND */ } while(0); Index: modules/rp/rp_tree.c diff -Nau modules/rp/rp_tree.c.orig modules/rp/rp_tree.c --- modules/rp/rp_tree.c.orig Thu Jul 3 09:55:36 2003 +++ modules/rp/rp_tree.c Tue Dec 9 17:20:50 2003 @@@@ -201,7 +201,9 @@@@ if( NOERR(err=rp_init_attr_tree(reg_id, A_IN)) && NOERR(err=rp_init_attr_tree(reg_id, A_RT)) && NOERR(err=rp_init_attr_tree(reg_id, A_I6)) - && NOERR(err=rp_init_attr_tree(reg_id, A_DN)) ) { + && NOERR(err=rp_init_attr_tree(reg_id, A_DN)) + && NOERR(err=rp_init_attr_tree(reg_id, A_RA))) { + return RP_OK; } a25 13 Index: modules/sv/server.c diff -Nau modules/sv/server.c.orig modules/sv/server.c --- modules/sv/server.c.orig Thu Jul 3 09:55:45 2003 +++ modules/sv/server.c Tue Dec 9 17:22:24 2003 @@@@ -656,7 +656,7 @@@@ if(IS_UPDATE(update_mode)) { /* update_port = SK_atoport(CO_get_update_port(), "tcp"); */ update_port = ca_get_srcupdateport(source_hdl); - printf("XXX htons(update_port)=%d\n", update_port); + /* printf("XXX htons(update_port)=%d\n", update_port); */ /* XXX ask AMRM to change the name of the function */ SV_update_sock[source] = SK_getsock(SOCK_STREAM, update_port, 128, INADDR_ANY); a38 189 Index: modules/ud/ud_comrol.c diff -Nau modules/ud/ud_comrol.c.orig modules/ud/ud_comrol.c --- modules/ud/ud_comrol.c.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_comrol.c Tue Dec 9 17:28:22 2003 @@@@ -285,6 +285,10 @@@@ case C_IN: case C_I6: case C_FS: + case C_RA: /* Range object */ + case C_RI: /* Registry object */ + case C_PP: /* Pop object */ + case C_TK: /* Ticket object */ /* if((tr->save)){ */ /* Some special processing for tables with the second attribute */ /* Update the second field of the table with query like one below */ @@@@ -298,11 +302,18 @@@@ break; /* netname for inetnum and inet6num */ case C_IN: + case C_RA: case C_I6: attr_type=A_NA; break; /* filter for filter-set */ case C_FS: attr_type=A_FI; break; + case C_RI: attr_type=A_WW; /* Save reg window size */ + break; + case C_PP: attr_type=A_RR; /* Save remedyref */ + break; + case C_TK: attr_type=A_NA; /* Save ticket/netname */ + break; default: LG_log(ud_context, LG_SEVERE, "not valid class type\n"); attr_type=A_END; @@@@ -820,6 +831,7 @@@@ /* Only for these types of objects and only if we have collected data (tr->save != NULL) */ if( ( (tr->class_type==C_RT) || (tr->class_type==C_IN) + || (tr->class_type==C_RA) /* Range object */ || (tr->class_type==C_I6) || (tr->class_type==C_DN))) { /* Collect some data for radix tree and NH repository update for deletes*/ Index: modules/ud/ud_comrol.h diff -Nau modules/ud/ud_comrol.h.orig modules/ud/ud_comrol.h --- modules/ud/ud_comrol.h.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_comrol.h Tue Dec 9 17:35:09 2003 @@@@ -73,7 +73,7 @@@@ "admin_c","tech_c","rev_srv","notify","mnt_by","mnt_lower","mnt_routes","mnt_irt",NULL}; /*C_I6,*/ char *t_in[]={ "mntner","person_role","names","irt",NULL,NULL, - "admin_c","tech_c","rev_srv","notify","mnt_by","mnt_lower","mnt_routes","mnt_irt",NULL}; /*C_IN,*/ + "admin_c","tech_c","rev_srv","notify","mnt_by","mnt_lower","mnt_routes","mnt_irt","reg_ref",NULL}; /*C_IN,*/ char *t_ir[]={ "mntner","person_role","names",NULL,NULL,NULL, "ifaddr","admin_c","tech_c","notify","mnt_by",NULL}; /*C_IR,*/ @@@@ -114,6 +114,21 @@@@ char *t_it[]={ "mntner","person_role","names",NULL,NULL,NULL, "admin_c","tech_c","notify","mnt_by","auth","irt_nfy",NULL}; /*C_IS,*/ +char *t_ri[]={ "mntner","person_role","names",NULL,NULL,NULL, + "mnt_by","as_ref", NULL}; /*C_RI */ + +char *t_pp[]={ "mntner","person_role","names",NULL,NULL,NULL, + "mnt_by","as_ref", "reg_ref", NULL}; /*C_PP */ + +char *t_tk[]={ "mntner","person_role","names",NULL,NULL,NULL, + "mnt_by","reg_ref", NULL}; /*C_TK */ + +char *t_ra[]={ "mntner","person_role","names","irt",NULL,NULL, + "admin_c","tech_c","rev_srv","notify","mnt_by","mnt_lower","mnt_routes","mnt_irt","reg_ref","pop_ref","purp_ref",NULL}; /*C_RA */ + +char *t_pu[]={ "mntner","person_role","names",NULL,NULL,NULL, + "mnt_by", NULL}; /*C_PU */ + /* IMPORTANT !!! */ /* This stuff should be consistent with DF_classnames.def */ @@@@ -136,6 +151,11 @@@@ t_ps, t_is, t_it, +t_ri, +t_pp, +t_tk, +t_ra, +t_pu, NULL }; Index: modules/ud/ud_core.c diff -Nau modules/ud/ud_core.c.orig modules/ud/ud_core.c --- modules/ud/ud_core.c.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_core.c Tue Dec 9 17:57:15 2003 @@@@ -654,6 +654,10 @@@@ /* Determine the attribute type */ attribute_type = rpsl_get_attr_id(rpsl_attr_get_name(attribute)); /* Get attribute value .It is already clean since we process the flattened copy of the object */ + if(attribute_type==A_AX || attribute_type==A_RG || /* Never allow dummy for */ + attribute_type==A_TK || attribute_type==A_PF || /* reg-id, pop and ticket */ + attribute_type==A_UF) + return 1; attribute_value = rpsl_attr_get_value(attribute); query_fmt = DF_get_dummy_query(attribute_type); @@@@ -917,6 +921,22 @@@@ get_ref_id(tr, "mntner", "mntner", attribute_value, condition)); } break; + case UD_AX_AX: /* Update as_ref reference */ + g_string_sprintf(tr->query, query_fmt, tr->thread_upd, tr->object_id, + get_ref_id(tr, "aut_num", "aut_num", attribute_value, NULL)); + break; + case UD_AX_RG: /* Update reg_ref reference */ + g_string_sprintf(tr->query, query_fmt, tr->thread_upd, tr->object_id, + get_ref_id(tr, "reg_id", "reg_id", attribute_value, NULL)); + break; + case UD_AX_PP: /* Update pop reference */ + g_string_sprintf(tr->query, query_fmt, tr->thread_upd, tr->object_id, + get_ref_id(tr, "pop", "pop", attribute_value, NULL)); + break; + case UD_AX_PU: /* Update purpose reference */ + g_string_sprintf(tr->query, query_fmt, tr->thread_upd, tr->object_id, + get_ref_id(tr, "purpose", "purpose", attribute_value, NULL)); + break; case UD_LEAF_: g_string_sprintf(tr->query, query_fmt, tr->thread_upd, tr->object_id, attribute_value); break; @@@@ -1144,8 +1164,19 @@@@ } break; case UD_AUX__: /* for AUX tables*/ - g_string_sprintf(tr->query, query_fmt, tr->thread_ins, tr->object_id, tr->class_type, attribute_value); - if(!IS_DUMMY_ALLOWED(tr->mode))g_string_sprintfa(tr->query, " AND dummy=0 "); + /* Never create dummys for this attribute */ + if(attribute_type==A_AX || attribute_type==A_RG || + attribute_type==A_TK || attribute_type==A_PF || + attribute_type==A_UF ) + { + g_string_sprintf(tr->query, query_fmt, tr->thread_ins, tr->object_id, + tr->class_type, attribute_value); + } + else { + g_string_sprintf(tr->query, query_fmt, tr->thread_ins, tr->object_id, + tr->class_type, attribute_value); + if(!IS_DUMMY_ALLOWED(tr->mode))g_string_sprintfa(tr->query, " AND dummy=0 "); + } break; case UD_AX_MO: /* for member_of table*/ set_name = get_set_name(tr->class_type); Index: modules/ud/ud_rx.c diff -Nau modules/ud/ud_rx.c.orig modules/ud/ud_rx.c --- modules/ud/ud_rx.c.orig Thu Jul 3 09:55:49 2003 +++ modules/ud/ud_rx.c Tue Dec 9 17:58:11 2003 @@@@ -44,6 +44,7 @@@@ const gchar *attribute_value; switch(attribute_type){ + case A_RA: /* Range object */ case A_IN: case A_RT: case A_I6: Index: modules/wk/which_keytypes.h diff -Nau modules/wk/which_keytypes.h.orig modules/wk/which_keytypes.h --- modules/wk/which_keytypes.h.orig Thu Jul 3 09:55:56 2003 +++ modules/wk/which_keytypes.h Tue Dec 9 18:05:54 2003 @@@@ -54,6 +54,11 @@@@ WK_PEERINGSET, /*+ peering-set name +*/ WK_RTRSET, /*+ router-set name +*/ WK_IRT, /*+ irt name +*/ + WK_REGID, /*+ registry id / reg-id +*/ + WK_POP, /*+ pop +*/ + WK_TICKET, /*+ ticket +*/ + WK_RANGE, /*+ range +*/ + WK_PURPOSE, /*+ purpose +*/ WK_END } WK_Type; @@@@ -87,6 +92,11 @@@@ "peering_set", "rtr_set", "irt", + "reg_id", + "pop", + "ticket", + "ipprefix", + "purpose", NULL }; /* Keytypes[] */ @ 1.1 log @flush my already done work @ text @d1 393 d395 3 a397 2 --- Makefile.site.in.orig 2003-07-30 10:17:29.000000000 +0200 +++ Makefile.site.in 2003-11-27 20:41:14.000000000 +0100 d406 3 a408 2 --- configure.orig 2003-07-29 11:45:09.000000000 +0200 +++ configure 2003-11-27 20:42:00.000000000 +0100 a499 36 Index: modules/sk/sk_socket.c --- modules/sk/sk_socket.c.orig 2003-07-03 09:55:41.000000000 +0200 +++ modules/sk/sk_socket.c 2003-11-27 20:41:14.000000000 +0100 @@@@ -65,7 +65,9 @@@@ #ifdef __linux__ if(getservbyname_r(service, proto, &result, buffer, sizeof(buffer), &serv) < 0) serv = NULL; -#else +#elif defined(__FreeBSD__) + serv = getservbyname(service, proto); +#else serv = getservbyname_r(service, proto, &result, buffer, sizeof(buffer)); #endif @@@@ -261,6 +263,9 @@@@ #ifdef __linux__ er = (gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &hp, &error) < 0 ); +#elif defined(__FreeBSD__) + hp = gethostbyname(hostname); + er = ( hp == NULL ); #else /* default is Solaris implementation */ hp = gethostbyname_r(hostname, &result, aliasbuf, sizeof(aliasbuf), &error); Index: modules/ud/ud_main.c --- modules/ud/ud_main.c.orig 2003-07-03 09:55:49.000000000 +0200 +++ modules/ud/ud_main.c 2003-11-27 20:41:14.000000000 +0100 @@@@ -120,6 +120,8 @@@@ } #ifdef __linux__ if(gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &hptr, &error)<0) hptr=NULL; +#elif defined(__FreeBSD__) + hptr=gethostbyname(nrtm->server); #else/* default is Solaris implementation */ hptr=gethostbyname_r(nrtm->server, &result, host_info, sizeof(host_info), &error); #endif @