ctdb-common: Protocol argument must be in host order for socket() call
[samba.git] / ctdb / common / system_kfreebsd.c
index b241aa8e6c22d69aa33a8baa56368762f99b4c5b..5d4bb5d36d76dbbdfff938deeebf90d35cdffe32 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "lib/util/debug.h"
 
-#include "ctdb_private.h"
+#include "protocol/protocol.h"
 
 #include <net/ethernet.h>
 #include <netinet/ip6.h>
@@ -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)));