ctdb-common: Protocol argument must be in host order for socket() call
[samba.git] / ctdb / common / system_gnu.c
index 12462050e866dde7c798ac424a50e1cf032f4650..b99607d10f454fc542e8cce0ce9b96c21108fdf6 100644 (file)
@@ -162,7 +162,7 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
                ip4pkt.tcp.check    = tcp_checksum((uint16_t *)&ip4pkt.tcp, sizeof(ip4pkt.tcp), &ip4pkt.ip);
 
                /* open a raw socket to send this segment from */
-               s = socket(AF_INET, SOCK_RAW, htons(IPPROTO_RAW));
+               s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
                if (s == -1) {
                        DEBUG(DEBUG_CRIT,(__location__ " failed to open raw socket (%s)\n",
                                 strerror(errno)));