<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#C0C0C0">
    <p>Hi Alexey<br>
      <br>
         I have a problem consult with you about net_stress.ipsec_dccp.
      when execute net_stress.ipsec_dccp on RHEL7.5Beta,<br>
      <br>
      dccp4_ipsec* / dccp6_ipsce* all faill and report the same error .
      the error info is "socket(10, 6, 33) failed: ESOCKTNOSUPPORT",<br>
      <br>
      I debug this error, find this error happen  on create a ipv6 dccp 
      socket,but ipv6 dccp type socket is no support on RHEL7.5Beta.<br>
      <br>
      so I want to know whether this error cause by RHEL7.5Beta system
      self no support or all socket no support ipv6 dccp type socket by
      no?<br>
      <br>
      and I have a another thought maybe no right is that add a judge
      about whether need execute "IPv6 socket is also able to access
      IPv4 protocol stack"<br>
      <br>
      on the line of 578 of server_init() if I only test ipv4 .<br>
      <br>
      562 static void server_init(void)<br>
      563 {<br>
      564         char *src_addr = NULL;<br>
      565         struct addrinfo hints;<br>
      566<br>
      567         memset(&hints, 0, sizeof(struct addrinfo));<br>
      568         hints.ai_family = AF_INET6;<br>
      569         hints.ai_socktype = sock_type;<br>
      570         hints.ai_flags = AI_PASSIVE;<br>
      571<br>
      572         if (source_addr && !strchr(source_addr, ':'))<br>
      573                 SAFE_ASPRINTF(&src_addr, "::ffff:%s",
      source_addr);<br>
      574         setup_addrinfo(src_addr ? src_addr : source_addr,
      tcp_port,<br>
      575                        &hints, &local_addrinfo);<br>
      576         free(src_addr);<br>
      577<br>
      578         /* IPv6 socket is also able to access IPv4 protocol
      stack */<br>
      579         sfd = SAFE_SOCKET(family, sock_type, protocol);<br>
      580         SAFE_SETSOCKOPT_INT(sfd, SOL_SOCKET, SO_REUSEADDR, 1);<br>
      <br>
      <br>
      below is my debug about  "socket(10, 6, 33) failed:
      ESOCKTNOSUPPORT"<br>
      <br>
      man socket we can know socket()<br>
      <br>
      int socket(int domain, int type, int protocol);<br>
      <br>
      file path: linux/include/linux/socket.h<br>
      <br>
      160 /* Supported address families. */<br>
      161 #define AF_UNSPEC       0<br>
      162 #define AF_UNIX         1       /* Unix domain
      sockets          */<br>
      163 #define AF_LOCAL        1       /* POSIX name for
      AF_UNIX       */<br>
      164 #define AF_INET         2       /* Internet IP
      Protocol         */<br>
      165 #define AF_AX25         3       /* Amateur Radio
      AX.25          */<br>
      166 #define AF_IPX          4       /* Novell
      IPX                   */<br>
      167 #define AF_APPLETALK    5       /* AppleTalk
      DDP                */<br>
      168 #define AF_NETROM       6       /* Amateur Radio
      NET/ROM        */<br>
      169 #define AF_BRIDGE       7       /* Multiprotocol
      bridge         */<br>
      170 #define AF_ATMPVC       8       /* ATM
      PVCs                     */<br>
      171 #define AF_X25          9       /* Reserved for X.25
      project    */<br>
      172 #define AF_INET6        10      /* IP version
      6                 */<br>
      ...<br>
      <br>
      line 172 ,we can know the domain =10  is  mean ipv6<br>
      <br>
      file path: linux/include/linux/net.h<br>
      <br>
       63 enum sock_type {<br>
       64         SOCK_STREAM     = 1,<br>
       65         SOCK_DGRAM      = 2,<br>
       66         SOCK_RAW        = 3,<br>
       67         SOCK_RDM        = 4,<br>
       68         SOCK_SEQPACKET  = 5,<br>
       69         SOCK_DCCP       = 6,<br>
       70         SOCK_PACKET     = 10,<br>
       71 };<br>
      <br>
      line 69, we can know type=6 is mean SOCK_DCCP<br>
      <br>
      rhel7.5Beta system etc config file : /etc/protocols<br>
      <br>
       42 irtp    28      IRTP            # Internet Reliable
      Transaction Protocol<br>
       43 iso-tp4 29      ISO-TP4         # ISO Transport Protocol Class
      4<br>
       44 netblt  30      NETBLT          # Bulk Data Transfer Protocol<br>
       45 mfe-nsp 31      MFE-NSP         # MFE Network Services
      Protocol<br>
       46 merit-inp       32      MERIT-INP               # MERIT
      Internodal Protocol<br>
       47 dccp    33      DCCP            # Datagram Congestion Control
      Protocol<br>
      <br>
      line 47 ,we can know protocols=33 is mean DCCP<br>
      <br>
      <br>
      file path:linux/include/uapi/asm-generic/errno.h<br>
      <br>
       76 #define EPROTONOSUPPORT 93      /* Protocol not supported */<br>
       77 #define ESOCKTNOSUPPORT 94      /* Socket type not supported
      */<br>
      <br>
      line 77 we can know  Socket type not support</p>
    <p>Test output is below<br>
    </p>
    <p><<<test_output>>>                                                                                                                             
      <br>
      incrementing
stop                                                                                                                             
      <br>
      dccp_ipsec 1 TINFO: Network config (local --
remote):                                                                                         
      <br>
      dccp_ipsec 1 TINFO: enp7s0f1 --
enp7s0f1                                                                                                      
      <br>
      dccp_ipsec 1 TINFO: 192.168.0.1/24 --
192.168.0.2/24                                                                                          
      <br>
      dccp_ipsec 1 TINFO: fd00:1:1:1::1/64 --
fd00:1:1:1::2/64                                                                                      
      <br>
      dccp_ipsec 1 TINFO: run server 'netstress -T dccp -R 500000 -g
46720'                                                                         
      <br>
      dccp_ipsec 1 TINFO: check that server port in 'LISTEN'
state                                                                                  
      <br>
      tst_test.c:980: INFO: Timeout per run is 0h 05m
00s                                                                                           
      <br>
      netstress.c:777: INFO: max requests
'500000'                                                                                                  
      <br>
      netstress.c:808: INFO: DCCP
server                                                                                                            
      <br>
      safe_net.c:94: BROK: netstress.c:579: socket(10, 6, 33) failed:
ESOCKTNOSUPPORT                                                               
      <br>
                                                                                                                                              
      <br>
Summary:                                                                                                                                      
      <br>
      passed  
0                                                                                                                                    
      <br>
      failed  
0                                                                                                                                    
      <br>
      skipped 
0                                                                                                                                    
      <br>
      warnings
0                                                                                                                                    
      <br>
      dccp_ipsec 1 TFAIL: server not in LISTEN state <br>
    </p>
    <p><br>
      that's all<br>
      <br>
      Thanks<br>
      <br>
      LianWen Sun<br>
    </p>
  </body>
</html>