Changes in / [1562:6219359a36a9:1558:932fca1cbbe4] in freeDiameter
- Files:
-
- 1 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1562 r1557 21 21 22 22 # CMake version 23 CMAKE_MINIMUM_REQUIRED(VERSION 2. 8.12)23 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 24 24 25 25 # Location of additional CMake modules -
INSTALL.Fedora
r1561 r861 4 4 5 5 Dependencies on Fedora 13 (from minimal system): 6 # yum install cmake make gcc gcc-c++ flex bison lksctp-tools-devel gnutls-devel libgcrypt-devel libidn 2-devel6 # yum install cmake make gcc gcc-c++ flex bison lksctp-tools-devel gnutls-devel libgcrypt-devel libidn-devel 7 7 8 8 In addition, if you have not already retrieved the latest source: -
INSTALL.FreeBSD
r1561 r921 35 35 4) Install 'flex' and 'bison', same way. 36 36 37 5) Install 'gnutls' and 'libidn 2', same way also.37 5) Install 'gnutls' and 'libidn', same way also. 38 38 39 39 6) Retrieve freeDiameter source code: -
INSTALL.OSX
r1561 r1288 40 40 41 41 2) Install dependencies: 42 $ brew install mercurial cmake gnutls libgcrypt postgres mysql libidn 242 $ brew install mercurial cmake gnutls libgcrypt postgres mysql libidn 43 43 44 44 Notes: 45 * GNU IDN (libidn 2) is optional, see below45 * GNU IDN (libidn) is optional, see below 46 46 * When libusrsctp package is available, you can use it as well. 47 47 However, it requires some rework on the source code as libusrsctp is not fully -
INSTALL.OpenSUSE
r1561 r858 4 4 5 5 Dependencies on OpenSUSE 11.3 (from minimal server system installation): 6 # zypper install cmake make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel libidn 2-devel6 # zypper install cmake make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel libidn-devel 7 7 # zypper install mercurial 8 8 -
INSTALL.Ubuntu
r1561 r1351 18 18 19 19 The following packages are required to compile freeDiameter from source: 20 cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn 2-dev20 cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev 21 21 22 (note that libidn 2and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT)22 (note that libidn and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT) 23 23 24 24 Additionnaly, these ones may be useful: … … 45 45 46 46 # Install the dependencies for building the source: 47 sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn 2-dev ssl-cert debhelper fakeroot \47 sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev ssl-cert debhelper fakeroot \ 48 48 libpq-dev libmysqlclient-dev libxml2-dev swig python-dev 49 49 … … 85 85 86 86 1) Install all packages dependencies 87 # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn 2-dev87 # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev 88 88 89 89 2) (OPTION) If you will compile modules that require postgresql, also install: -
INSTALL.pkgsrc
r1561 r1334 9 9 If you want to build and install freeDiameter from the repository, 10 10 you'll need to install: 11 pkg_add bison pkg-config libidn 2gnutls libgcrypt mercurial11 pkg_add bison pkg-config libidn gnutls libgcrypt mercurial 12 12 and follow the usual installation note. 13 13 -
contrib/RPM/freeDiameter.spec
r1561 r1224 11 11 12 12 BuildRequires: cmake make gcc gcc-c++ flex bison lksctp-tools-devel 13 BuildRequires: gnutls-devel libgcrypt-devel libidn 2-devel13 BuildRequires: gnutls-devel libgcrypt-devel libidn-devel 14 14 BuildRequires: mercurial 15 15 Requires: lksctp-tools -
contrib/debian/control
r1561 r1310 5 5 Build-Depends: debhelper ( >= 7.3.9), 6 6 cmake, make, gcc, g++, bison, flex, 7 libsctp-dev, libgnutls-dev | gnutls-dev, libidn 2-dev,7 libsctp-dev, libgnutls-dev | gnutls-dev, libidn11-dev, 8 8 libpq-dev, libmysqlclient-dev, libxml2-dev, swig, python-dev, 9 9 libgcrypt11-dev | libgcrypt20-dev -
contrib/nightly_tests/prereqs.fedora
r1561 r1053 4 4 postgresql-server postgresql-devel 5 5 mysql-server mysql-devel 6 libxml2 libxml2-devel libidn 2-devel6 libxml2 libxml2-devel libidn-devel 7 7 swig python-devel 8 8 -
include/freeDiameter/CMakeLists.txt
r1561 r1406 2 2 3 3 Project("freeDiameter includes directory" C) 4 5 INCLUDE(FindPkgConfig)6 4 7 5 ######################## … … 138 136 SET(SCTP_LIBRARIES ${SCTP_LIBRARIES} PARENT_SCOPE) 139 137 140 # IDNA process: we use GNU libidn2138 # IDNA process: we use libidn from GNU (unless the function & header files are included in libc) 141 139 IF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 142 PKG_CHECK_MODULES(IDNA libidn2) 143 IF(NOT IDNA_FOUND) 144 MESSAGE(SEND_ERROR "Unable to find libidn2, please install libidn2-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") 145 ENDIF() 140 FIND_PACKAGE(IDNA) 141 SET(CHECK_IDNA_SOURCE_CODE " 142 #include <idna.h> 143 int main() { 144 return idna_to_ascii_8z(NULL, NULL, 0); 145 } 146 ") 147 SET(CMAKE_REQUIRED_INCLUDES ${IDNA_INCLUDE_DIR}) 148 SET(CMAKE_REQUIRED_LIBRARIES ${IDNA_LIBRARIES}) 149 CHECK_C_SOURCE_COMPILES("${CHECK_IDNA_SOURCE_CODE}" HAS_IDNA_SUPPORT) 150 IF(NOT HAS_IDNA_SUPPORT) 151 MESSAGE(SEND_ERROR "Unable to find idna.h header or idna_to_ascii_8z function, please install libidn-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") 152 ENDIF(NOT HAS_IDNA_SUPPORT) 146 153 ELSE (NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 147 154 MESSAGE(STATUS "Non-default Internationalized Domain Names (IDN) behavior selected (no stringprep).") 148 155 ENDIF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) 156 SET(IDNA_INCLUDE_DIR ${IDNA_INCLUDE_DIR} PARENT_SCOPE) 157 SET(IDNA_LIBRARIES ${IDNA_LIBRARIES} PARENT_SCOPE) 149 158 150 159 … … 212 221 213 222 # LFDPROTO_LIBS = libraries required by the libfdproto. 214 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LI NK_LIBRARIES} PARENT_SCOPE)223 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LIBRARIES} PARENT_SCOPE) 215 224 # And includes paths 216 SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIR S} PARENT_SCOPE)225 SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIR} PARENT_SCOPE) 217 226 # Dependencies: the libraries required by any code linking to libfdproto. 218 227 SET(LFDPROTO_LINK_INTERFACES ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) -
libfdcore/CMakeLists.txt
r1560 r1286 3 3 4 4 # Configuration for newer cmake 5 cmake_policy(VERSION 2.8.12) 5 cmake_policy(VERSION 2.6) 6 if (POLICY CMP0022) 7 cmake_policy(SET CMP0022 OLD) 8 endif (POLICY CMP0022) 6 9 7 10 # Configuration parser -
libfdcore/p_ce.c
r1559 r1554 337 337 } 338 338 339 /* Origin-Realm is empty */340 if (hdr->avp_value->os.len == 0) {341 error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE";342 error->pei_message = "Your Origin-Realm is empty.";343 error->pei_avp = avp;344 return EINVAL;345 }346 347 339 /* Save the value */ 348 340 CHECK_MALLOC( peer->p_hdr.info.runtime.pir_realm = os0dup( hdr->avp_value->os.data, hdr->avp_value->os.len ) ); -
libfdproto/CMakeLists.txt
r1561 r1286 3 3 4 4 # Configuration for newer cmake 5 cmake_policy(VERSION 2.8.12) 5 cmake_policy(VERSION 2.6) 6 if (POLICY CMP0022) 7 cmake_policy(SET CMP0022 OLD) 8 endif (POLICY CMP0022) 6 9 7 10 # List of source files for the library … … 28 31 SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE) 29 32 33 # Include path 34 INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES}) 35 30 36 # Build as a shared library 31 37 ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC}) 32 33 # Include path34 TARGET_INCLUDE_DIRECTORIES(libfdproto PRIVATE /a/b/c ${LFDPROTO_INCLUDES})35 38 36 39 ADD_DEPENDENCIES(libfdproto version_information) -
libfdproto/messages.c
r1559 r1554 1777 1777 if (avp->avp_model == NULL) { 1778 1778 /* In the case where we don't know the type of AVP, just copy the raw data or source */ 1779 /* there might be no data if the AVP is empty */1779 CHECK_PARAMS( avp->avp_source || avp->avp_rawdata ); 1780 1780 1781 1781 if ( avp->avp_rawdata != NULL ) { … … 1783 1783 memcpy(&buffer[*offset], avp->avp_rawdata, avp->avp_rawlen); 1784 1784 *offset += PAD4(avp->avp_rawlen); 1785 } else if ( avp->avp_source != NULL ){1785 } else { 1786 1786 /* the message was not parsed completely */ 1787 1787 size_t datalen = avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags); -
libfdproto/ostr.c
r1561 r1127 37 37 38 38 #if (!defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)) 39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn 2documentation... */40 #include <idn 2.h> /* idn2_to_ascii_8z() */39 /* Process IDNA with stringprep -- See RFC5890 -- and libidn documentation... */ 40 #include <idna.h> /* idna_to_ascii_8z() */ 41 41 #endif /* !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) */ 42 42 … … 227 227 } 228 228 229 ret = idn 2_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES );230 if (ret == IDN 2_OK) {229 ret = idna_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES ); 230 if (ret == IDNA_SUCCESS) { 231 231 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity, it was changed to '%s'", *id, processed); 232 232 if (memory == 0) … … 236 236 /* Done! */ 237 237 } else { 238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanit ized: %s", *id, idn2_strerror (ret));238 TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanitanized: %s", *id, idna_strerror (ret)); 239 239 return EINVAL; 240 240 }
Note: See TracChangeset
for help on using the changeset viewer.