<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#C0C0C0">
<p>Hi Alexey</p>
<p> I have a problem consult with you about net_stress.ipsec_dccp.
when execute net_stress.ipsec_dccp on RHEL7.5Beta, <br>
</p>
<p>dccp4_ipsec* / dccp6_ipsce* all faill and report the same error .
the error info is "socket(10, 6, 33) failed: ESOCKTNOSUPPORT",</p>
<p>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.</p>
<p>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?</p>
<p>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>
</p>
<p>on the line of 578 of server_init() if I only test ipv4 .<br>
</p>
<p>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);</p>
<p><br>
</p>
<p> below is my debug about "socket(10, 6, 33) failed:
ESOCKTNOSUPPORT"</p>
<p>man socket we can know socket()<br>
</p>
<p>int socket(int domain, int type, int protocol);</p>
<p>file path: linux/include/linux/socket.h<br>
</p>
<p>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>
...</p>
<p>line 172 ,we can know the domain =10 is mean ipv6</p>
<p>file path: linux/include/linux/net.h</p>
<p> 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>
</p>
<p>line 69, we can know type=6 is mean SOCK_DCCP</p>
<p>rhel7.5Beta system etc config file : /etc/protocols</p>
<p> 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>
</p>
<p>line 47 ,we can know protocols=33 is mean DCCP</p>
<p><br>
</p>
<p>file path:linux/include/uapi/asm-generic/errno.h<br>
</p>
<p> 76 #define EPROTONOSUPPORT 93 /* Protocol not supported */<br>
77 #define ESOCKTNOSUPPORT 94 /* Socket type not supported
*/</p>
<p>line 77 we can know Socket type not support</p>
<p>that's all</p>
<p>Thanks <br>
</p>
<p>LianWen Sun<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>