Blob Blame History Raw
Resolves: #1567227

--- a/xinetd/confparse.c	2018-05-04 11:00:11.019748833 +0200
+++ b/xinetd/confparse.c	2018-05-04 11:49:26.519996478 +0200
@@ -860,6 +860,14 @@ static status_e check_entry( struct serv
       }
    }
 
+   if ( SC_SOCKET_TYPE(scp) == SOCK_DGRAM && !SC_WAITS(scp) )
+   {
+         msg( LOG_ERR, func,
+              "Service %s has socket_type dgram, but does not wait",
+              SC_NAME(scp) );
+         return FAILED;
+   }
+
    if ( service_attr_check( scp ) == FAILED )
       return( FAILED ) ;
 
--- a/xinetd/main.c	2018-05-04 10:02:11.999315632 +0200
+++ b/xinetd/main.c	2018-05-04 10:03:44.124500979 +0200
@@ -296,6 +296,7 @@ static void find_bad_fd(void)
                               SVC_ID( sp ) ) ;
                svc_deactivate( sp ) ;
                found = TRUE ;
+               bad_fd_count++ ;
                break ;
             }
          }
@@ -303,6 +304,7 @@ static void find_bad_fd(void)
          {
 #ifdef HAVE_POLL
             ps.rws.pfd_array[fd].events = 0;
+            ps.rws.pfd_array[fd].fd = -1;
 #else
             FD_CLR( fd, &ps.rws.socket_mask ) ;
 #endif