"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xinetd/addr.c" between
xinetd-2.3.15.tar.gz and xinetd-2.3.15.4.tar.xz

About: xinetd is a secure replacement for inetd, the internet services daemon (openSUSE fork).

addr.c  (xinetd-2.3.15):addr.c  (xinetd-2.3.15.4.tar.xz)
skipping to change at line 21 skipping to change at line 21
#include <netinet/in.h> #include <netinet/in.h>
#include <syslog.h> #include <syslog.h>
#include <netdb.h> #include <netdb.h>
#include <memory.h> #include <memory.h>
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <sys/param.h> #include <sys/param.h>
#include <string.h> #include <string.h>
#ifdef HAVE_NETDB_H
#include <netdb.h> #include <netdb.h>
#endif
#if defined(HAVE_ARPA_INET_H)
#include <arpa/inet.h> #include <arpa/inet.h>
#endif
#include <netinet/in.h> #include <netinet/in.h>
#include "sio.h" #include "sio.h"
#include "str.h" #include "str.h"
#include "addr.h" #include "addr.h"
#include "msg.h" #include "msg.h"
#include "util.h" #include "util.h"
#include "xtimer.h" #include "xtimer.h"
#include "libportable.h" #include "libportable.h"
#define OPEN_CURLY_BRACKET '{' #define OPEN_CURLY_BRACKET '{'
#define CLOSED_CURLY_BRACKET '}' #define CLOSED_CURLY_BRACKET '}'
#define COMMA ',' #define COMMA ','
#define DOT '.' #define DOT '.'
#ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 255
#endif
typedef enum { CANT_PARSE, PARSED, ERROR } result_e ; typedef enum { CANT_PARSE, PARSED, ERROR } result_e ;
typedef enum { NUMERIC_ADDR, NET_ADDR, HOST_ADDR } address_e ; typedef enum { NUMERIC_ADDR, NET_ADDR, HOST_ADDR } address_e ;
/* /*
* address types denote how the actual numeric address was obtained. * address types denote how the actual numeric address was obtained.
* Currently they are only useful for debugging. * Currently they are only useful for debugging.
* Note that NUMERIC_ADDR includes both simple (e.g. 128.138.91.1) and * Note that NUMERIC_ADDR includes both simple (e.g. 128.138.91.1) and
* factorized symbolic addresses (e.g. 128.138.91.{1,2,3}). * factorized symbolic addresses (e.g. 128.138.91.{1,2,3}).
*/ */
struct comp_addr struct comp_addr
skipping to change at line 139 skipping to change at line 139
return 0; return 0;
hname[0] = 0; hname[0] = 0;
for ( u = 0 ; u < addr_count ; u++ ) for ( u = 0 ; u < addr_count ; u++ )
{ {
struct comp_addr *cap = CAP( pset_pointer( addr_list, u ) ) ; struct comp_addr *cap = CAP( pset_pointer( addr_list, u ) ) ;
if ( cap == NULL ) if ( cap == NULL )
continue ; continue ;
if( (cap->addr_type == HOST_ADDR) ) if( cap->addr_type == HOST_ADDR )
{ {
char *tmpname = NULL; char *tmpname = NULL;
if ( hname[0] == 0 ) if ( hname[0] == 0 )
{ {
memset(hname, 0, NI_MAXHOST); memset(hname, 0, NI_MAXHOST);
if ( getnameinfo(addr, length, hname, NI_MAXHOST, if ( getnameinfo(addr, length, hname, NI_MAXHOST,
NULL, 0, NI_NAMEREQD) ) NULL, 0, NI_NAMEREQD) )
{ /* { /*
* Name cannot be looked up if here. We should continue * Name cannot be looked up if here. We should continue
* searching the list in case a IP address or net mask agrees * searching the list in case a IP address or net mask agrees
 End of changes. 6 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)