The Samba-Bugzilla – Attachment 11900 Details for
Bug 11770
TCP Connections are not reset during IP failover
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-4 and v4-3 branches
0001-ctdb-common-For-AF_PACKET-socket-types-protocol-is-i.patch (text/plain), 2.38 KB, created by
Amitay Isaacs
on 2016-03-05 03:19:43 UTC
(
hide
)
Description:
Patch for v4-4 and v4-3 branches
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2016-03-05 03:19:43 UTC
Size:
2.38 KB
patch
obsolete
>From 6d2ca90a5db54d07eed5781913020653e4f23c90 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Thu, 3 Mar 2016 14:17:40 +1100 >Subject: [PATCH] ctdb-common: For AF_PACKET socket types, protocol is in > network order > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11770 > >From man page of packet(7): > > protocol is the IEEE 802.3 > protocol number in network byte order. See the <linux/if_ether.h> > include file for a list of allowed protocols. When protocol is set to > htons(ETH_P_ALL), then all protocols are received. > >Protocol argument was changed from network order to host order wrongly >in commit 9f8395cb7d49b63a82f75bf504f5f83920102b29. > >Specifying "protocol" field to socket(AF_PACKET, ...) call only affects >the packets that are recevied. So use protocol = 0 when sending raw >packets. > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> > >Autobuild-User(master): Martin Schwenke <martins@samba.org> >Autobuild-Date(master): Fri Mar 4 12:58:50 CET 2016 on sn-devel-144 > >(cherry picked from commit f5b6a5b13406c245ab9cc8c1699483af9eb21f88) >--- > ctdb/common/system_linux.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c >index d523617..6d01699 100644 >--- a/ctdb/common/system_linux.c >+++ b/ctdb/common/system_linux.c >@@ -100,7 +100,7 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface) > > switch (addr->ip.sin_family) { > case AF_INET: >- s = socket(AF_PACKET, SOCK_RAW, ETHERTYPE_ARP); >+ s = socket(AF_PACKET, SOCK_RAW, 0); > if (s == -1){ > DEBUG(DEBUG_CRIT,(__location__ " failed to open raw socket\n")); > return -1; >@@ -194,7 +194,7 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface) > close(s); > break; > case AF_INET6: >- s = socket(AF_PACKET, SOCK_RAW, ETHERTYPE_ARP); >+ s = socket(AF_PACKET, SOCK_RAW, 0); > if (s == -1){ > DEBUG(DEBUG_CRIT,(__location__ " failed to open raw socket\n")); > return -1; >@@ -460,7 +460,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data) > int s; > > /* Open a socket to capture all traffic */ >- s = socket(AF_PACKET, SOCK_RAW, ETH_P_ALL); >+ s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); > if (s == -1) { > DEBUG(DEBUG_CRIT,(__location__ " failed to open raw socket\n")); > return -1; >-- >2.5.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
martins
:
review+
Actions:
View
Attachments on
bug 11770
: 11900