Blame SOURCES/xinetd-2.3.15-udp-wait.patch

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