--- httpd-2.4.28/server/listen.c.socketactivation      2017-08-16 19:48:29.000000000 +0300
 +++ httpd-2.4.28/server/listen.c       2017-10-14 18:48:36.275690612 +0300
-@@ -17,114 +17,107 @@
- #include "apr_network_io.h"
+@@ -18,114 +18,107 @@
  #include "apr_strings.h"
  
  #define APR_WANT_STRFUNC
  #include "apr_want.h"
+ #include "apr_version.h"
  
  #include "ap_config.h"
  #include "httpd.h"
       * If no size is specified, use the kernel default.
       */
      if (send_buffer_size) {
-@@ -152,55 +145,71 @@
+@@ -153,55 +146,71 @@
      ap_sock_disable_nagle(s);
  #endif
  
                       server->bind_addr);
          apr_socket_close(s);
          return stat;
-@@ -260,40 +269,159 @@
-             ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00075)
-                           "Failed to enable the '%s' Accept Filter",
-                           accf);
-         }
- #else
-         rv = apr_socket_opt_set(s, APR_TCP_DEFER_ACCEPT, 30);
-         if (rv != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(rv)) {
-             ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00076)
-                               "Failed to enable APR_TCP_DEFER_ACCEPT");
-         }
- #endif
-     }
- }
- 
- static apr_status_t close_listeners_on_exec(void *v)
+@@ -283,40 +292,159 @@
+ static int match_address(const apr_sockaddr_t *sa,
+                          const char *hostname, apr_port_t port,
+                          const char *scope_id, apr_pool_t *p)
  {
-     ap_close_listeners();
-     return APR_SUCCESS;
+     const char *old_scope = NULL;
+ 
+ #if APR_VERSION_AT_LEAST(1,7,0)
+     /* To be clever here we could correctly match numeric and
+      * non-numeric zone ids.  Ignore failure, old_scope will be left
+      * as NULL. */
+     (void) apr_sockaddr_zone_get(sa, &old_scope, NULL, p);
+ #endif
+     
+     return port == sa->port
+         && ((!hostname && !sa->hostname)
+             || (hostname && sa->hostname && !strcmp(sa->hostname, hostname)))
+         && ((!scope_id && !old_scope)
+             || (scope_id && old_scope && !strcmp(scope_id, old_scope)));            
  }
  
 +
 +#endif /* HAVE_SYSTEMD */
 +
 +
+ /* ### This logic doesn't cope with DNS changes across a restart. */
  static int find_listeners(ap_listen_rec **from, ap_listen_rec **to,
-                           const char *addr, apr_port_t port)
+                           const char *addr, apr_port_t port,
+                           const char *scope_id, apr_pool_t *temp_pool)
  {
      int found = 0;
  
          /* Some listeners are not real so they will not have a bind_addr. */
          if (sa) {
              ap_listen_rec *new;
-             apr_port_t oldport;
  
-             oldport = sa->port;
-             /* If both ports are equivalent, then if their names are equivalent,
-              * then we will re-use the existing record.
-              */
-             if (port == oldport &&
-                 ((!addr && !sa->hostname) ||
-                  ((addr && sa->hostname) && !strcmp(sa->hostname, addr)))) {
-@@ -478,41 +606,41 @@
+             /* Re-use the existing record if it matches completely
+              * against an existing listener. */
+             if (match_address(sa, addr, port, scope_id, temp_pool)) {
+                 found = 1;
+                 if (!to) {
+                     break;
+@@ -512,41 +640,41 @@
                      if (lr->bind_addr->port == cur->bind_addr->port
                          && IS_IN6ADDR_ANY(cur->bind_addr)
                          && apr_socket_opt_get(cur->sd, APR_IPV6_V6ONLY,
                      }
                      else {
                          ap_listeners = lr->next;
-@@ -590,42 +718,62 @@
+@@ -624,42 +752,62 @@
               * use the default for this listener.
               */
              for (addr = ls->addrs; addr && !found; addr = addr->next) {
          }
      }
  
-@@ -681,41 +829,41 @@
+@@ -715,41 +863,41 @@
              char *hostname;
              apr_port_t port;
              apr_sockaddr_t *sa;
              }
              lr = lr->next;
          }
-@@ -808,71 +956,82 @@
-         ap_have_so_reuseport = 0;
+@@ -695,74 +843,87 @@
  
      }
  }
      if (argc < 1 || argc > 2) {
          return "Listen requires 1 or 2 arguments.";
      }
+ 
 +#ifdef HAVE_SYSTEMD
 +    if (use_systemd == -1) {
 +        use_systemd = sd_listen_fds(0) > 0;
 +    }
 +#endif
- 
++
      rv = apr_parse_addr_port(&host, &scope_id, &port, argv[0], cmd->pool);
      if (rv != APR_SUCCESS) {
          return "Invalid address or port";
          host = NULL;
      }
  
+ #if !APR_VERSION_AT_LEAST(1,7,0)
      if (scope_id) {
-         /* XXX scope id support is useful with link-local IPv6 addresses */
-         return "Scope id is not supported";
+         return apr_pstrcat(cmd->pool,
+                            "Scope ID in address '", argv[0],
+                            "' not supported with APR " APR_VERSION_STRING,
+                            NULL);
      }
+ #endif
  
      if (!port) {
          return "Port must be specified";
 +    }
 +#endif
 +
-     return alloc_listener(cmd->server->process, host, port, proto, NULL);
++
+     return alloc_listener(cmd->server->process, host, port, proto,
+                           scope_id, NULL, cmd->temp_pool);
  }
  
  AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd,
          return "ListenBacklog must be > 0";
      }
  
-     ap_listenbacklog = b;
 
 %{?!serverlimit:%global serverlimit 1024}
 
 Name:          ihttpd
-Version:       2.4.57
+Version:       2.4.62
 Release:       %mkrel 1
 Summary:       The most widely used Web server on the Internet
 License:       ASL 2.0
 Patch29:       httpd-2.4.27-systemd.patch
 Patch30:       httpd-2.4.4-cachehardmax.patch
 #Patch31:      httpd-2.4.18-sslmultiproxy.patch
-Patch34:       httpd-2.4.17-socket-activation.patch
+Patch34:       httpd-2.4.60-socket-activation.patch
 #Patch35:      httpd-2.4.33-sslciphdefault.patch
 # Bug fixes
 # http://issues.apache.org/bugzilla/show_bug.cgi?id=32524
 %prep
 %setup -q -n httpd-%{version}
 
-%patch1 -p1 -b .apctl
-%patch2 -p1 -b .apxs
-%patch3 -p1 -b .deplibs
-%patch5 -p1 -b .layout
-%patch6 -p1 -b .apctlsystemd
-%patch7 -p1 -b .detectsystemd
+%patch1 -P 1 -p1 -b .apctl
+%patch2 -P 2 -p1 -b .apxs
+%patch3 -P 3 -p1 -b .deplibs
+%patch5 -P 5 -p1 -b .layout
+%patch6 -P 6 -p1 -b .apctlsystemd
+%patch7 -P 7 -p1 -b .detectsystemd
 
 #Disable in ihttpd to avoid build fail
-#%patch23 -p1 -b .export
-%patch24 -p1 -b .corelimit
-#%patch26 -p1 -b .r1337344+
-%patch27 -p1 -b .icons
-%patch29 -p1 -b .systemd
-%patch30 -p1 -b .cachehardmax
+#%patch23 -P 23 -p1 -b .export
+%patch24 -P 24 -p1 -b .corelimit
+#%patch26 -P 26 -p1 -b .r1337344+
+%patch27 -P 27 -p1 -b .icons
+%patch29 -P 29 -p1 -b .systemd
+%patch30 -P 30 -p1 -b .cachehardmax
 # No longer applies
-#%patch31 -p1 -b .sslmultiproxy
-%patch34 -p1 -b .socketactivation
-#%patch35 -p1 -b .sslciphdefault
-#patch44 -p1 -b .luaresume
+#%patch31 -P 31 -p1 -b .sslmultiproxy
+%patch34 -P 34 -p1 -b .socketactivation
+#%patch35 -P 35 -p1 -b .sslciphdefault
+#patch44 -P 44 -p1 -b .luaresume
 
-%patch100 -p1 -b .ab_source_address.droplet
-%patch101 -p0 -b .PR45994.droplet
+%patch100 -P 100 -p1 -b .ab_source_address.droplet
+%patch101 -P 101 -p0 -b .PR45994.droplet
 
 # Patch in vendor/release string
 sed "s/@RELEASE@/%{vstring}/" < %{PATCH20} | patch -p1