linux/net
lucien 5fdf9ad9e9 sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING
commit 8a0d19c5ed upstream.

when A sends a data to B, then A close() and enter into SHUTDOWN_PENDING
state, if B neither claim his rwnd is 0 nor send SACK for this data, A
will keep retransmitting this data until t5 timeout, Max.Retrans times
can't work anymore, which is bad.

if B's rwnd is not 0, it should send abort after Max.Retrans times, only
when B's rwnd == 0 and A's retransmitting beyonds Max.Retrans times, A
will start t5 timer, which is also commit f8d9605243 ("sctp: Enforce
retransmission limit during shutdown") means, but it lacks the condition
peer rwnd == 0.

so fix it by adding a bit (zero_window_announced) in peer to record if
the last rwnd is 0. If it was, zero_window_announced will be set. and use
this bit to decide if start t5 timer when local.state is SHUTDOWN_PENDING.

Fixes: commit f8d9605243 ("sctp: Enforce retransmission limit during shutdown")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2016-01-28 11:57:53 +00:00
..
9p 9p: forgetting to cancel request on interrupted zero-copy RPC 2015-07-15 10:01:13 +01:00
802 neigh: use NEIGH_VAR_INIT in ndo_neigh_setup functions. 2014-01-16 11:31:58 -08:00
8021q net: Always untag vlan-tagged traffic on input. 2014-10-15 12:05:26 +02:00
appletalk appletalk: Fix socket referencing in skb 2014-07-08 19:39:43 -07:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
ax25 net: add validation for the socket syscall protocol argument 2016-01-04 17:20:45 +00:00
batman-adv batman-adv: Fix potentially broken skb network header access 2015-09-30 13:20:43 +01:00
bluetooth bluetooth: Validate socket address length in sco_sock_bind(). 2016-01-04 17:20:47 +00:00
bridge bridge: Only call /sbin/bridge-stp for the initial network namespace 2016-01-28 10:27:12 +00:00
caif unix/caif: sk_socket can disappear when state is unlocked 2015-06-12 13:30:18 +01:00
can can: add missing initialisations in CAN related skbuffs 2015-03-23 15:16:47 +00:00
ceph crush: fix a bug in tree bucket decode 2015-07-15 10:01:02 +01:00
core net: bpf: reject invalid shifts 2016-01-28 11:01:06 +00:00
dcb net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-04-24 13:44:54 -04:00
dccp ipv6: add complete rcu protection around np->opt 2015-12-18 16:06:24 +00:00
decnet net: add validation for the socket syscall protocol argument 2016-01-04 17:20:45 +00:00
dns_resolver dns_resolver: Null-terminate the right string 2014-07-20 22:33:32 -07:00
dsa net: dsa: Fix off-by-one in switch address parsing 2015-08-10 17:10:19 +01:00
ethernet net: eth_type_trans() should use skb_header_pointer() 2014-01-16 15:30:31 -08:00
hsr hsr: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
ieee802154 ieee802154: Fix sockaddr_ieee802154 implicit padding information leak. 2015-07-15 10:00:19 +01:00
ipv4 xfrm: dst_entries_init() per-net dst_ops 2016-01-28 11:57:51 +00:00
ipv6 xfrm: dst_entries_init() per-net dst_ops 2016-01-28 11:57:51 +00:00
ipx ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg 2014-12-01 10:02:10 +00:00
irda net: add validation for the socket syscall protocol argument 2016-01-04 17:20:45 +00:00
iucv af_iucv: correct cleanup if listen backlog is full 2014-05-30 17:35:23 -07:00
key net: Fix RCU splat in af_key 2015-09-03 13:30:00 +01:00
l2tp ipv6: add complete rcu protection around np->opt 2015-12-18 16:06:24 +00:00
lapb net/lapb: re-send packets on timeout 2013-09-23 16:52:45 -04:00
llc net: llc: use correct size for sysctl timeout entries 2015-03-02 15:04:42 +00:00
mac80211 mac80211: do not actively scan DFS channels 2016-01-05 12:08:20 +00:00
mac802154 mac802154: don't deliver packets to devices that are down 2014-06-11 12:10:19 -07:00
mpls net: gso: use feature flag argument in all protocol gso handlers 2015-08-27 14:27:14 +01:00
netfilter netfilter: nf_tables: fix bogus warning in nft_data_uninit() 2015-12-18 16:06:40 +00:00
netlabel netlabel: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
netlink netlink: Trim skb to alloc size to avoid MSG_TRUNC 2015-10-28 10:33:21 +00:00
netrom net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
nfc net: add __pskb_copy_fclone and pskb_copy_for_clone 2014-06-11 15:38:02 -07:00
openvswitch ovs: do not allocate memory from offline numa node 2015-10-28 10:33:20 +00:00
packet packet: infer protocol from ethernet header if unset 2015-12-18 16:06:18 +00:00
phonet phonet: properly unshare skbs in phonet_rcv() 2016-01-28 10:51:50 +00:00
rds RDS: fix race condition when sending a message on unbound socket 2016-01-04 17:20:35 +00:00
rfkill rfkill: copy the name into the rfkill struct 2016-01-25 10:43:34 +00:00
rose NET: ROSE: Don't dereference NULL neighbour pointer. 2015-07-15 10:00:49 +01:00
rxrpc rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg() 2015-03-24 10:31:10 +00:00
sched act_pedit: check binding before calling tcf_hash_release() 2015-08-25 10:13:55 +01:00
sctp sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING 2016-01-28 11:57:53 +00:00
sunrpc SUNRPC: Fix callback channel 2016-01-11 10:50:19 +00:00
tipc net/tipc: initialize security state for new connection socket 2015-08-27 13:31:56 +01:00
unix unix: properly account for FDs passed over unix sockets 2016-01-28 10:23:38 +00:00
vmw_vsock vsock: Make transport the proto owner 2014-05-05 13:13:50 -04:00
wimax wimax: remove dead code 2013-11-21 13:09:42 -05:00
wireless cfg80211: ignore netif running state when changing iftype 2015-07-15 10:01:22 +01:00
x25 net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
xfrm xfrm: dst_entries_init() per-net dst_ops 2016-01-28 11:57:51 +00:00
compat.c net: compat: Update get_compat_msghdr() to match copy_msghdr_from_user() behaviour 2015-03-24 10:48:46 +00:00
Kconfig Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2014-04-03 13:05:42 -07:00
Makefile net: move 6lowpan compression code to separate module 2014-01-15 15:36:38 -08:00
nonet.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
socket.c net: socket: Fix the wrong returns for recvmsg and sendmsg 2015-06-02 11:10:03 +01:00
sysctl_net.c net: Update the sysctl permissions handler to test effective uid/gid 2013-10-07 15:57:56 -04:00