ctdb-common: Protocol argument must be in host order for socket() call
[samba.git] / ctdb / common / system_kfreebsd.c
index b0303173c7342b71d0a04c044dabdda3d6d3689c..5d4bb5d36d76dbbdfff938deeebf90d35cdffe32 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)));