1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Update MPTCP 0.94 patch

This commit is contained in:
Ycarus 2018-03-25 07:39:55 +02:00
parent c75e33e9b3
commit b3ca88732c

View file

@ -10157,10 +10157,10 @@ index 0000000..797b91f
+ mptw->rcv_nxt++; + mptw->rcv_nxt++;
+ rcu_assign_pointer(mptw->mpcb, mpcb); + rcu_assign_pointer(mptw->mpcb, mpcb);
+ +
+ spin_lock(&mpcb->tw_lock); + spin_lock_bh(&mpcb->tw_lock);
+ list_add_rcu(&mptw->list, &tp->mpcb->tw_list); + list_add_rcu(&mptw->list, &tp->mpcb->tw_list);
+ mptw->in_list = 1; + mptw->in_list = 1;
+ spin_unlock(&mpcb->tw_lock); + spin_unlock_bh(&mpcb->tw_lock);
+ +
+ return 0; + return 0;
+} +}
@ -10176,12 +10176,12 @@ index 0000000..797b91f
+ * from the list and drop the ref properly. + * from the list and drop the ref properly.
+ */ + */
+ if (mpcb && atomic_inc_not_zero(&mpcb->mpcb_refcnt)) { + if (mpcb && atomic_inc_not_zero(&mpcb->mpcb_refcnt)) {
+ spin_lock(&mpcb->tw_lock); + spin_lock_bh(&mpcb->tw_lock);
+ if (tw->mptcp_tw->in_list) { + if (tw->mptcp_tw->in_list) {
+ list_del_rcu(&tw->mptcp_tw->list); + list_del_rcu(&tw->mptcp_tw->list);
+ tw->mptcp_tw->in_list = 0; + tw->mptcp_tw->in_list = 0;
+ } + }
+ spin_unlock(&mpcb->tw_lock); + spin_unlock_bh(&mpcb->tw_lock);
+ +
+ /* Twice, because we increased it above */ + /* Twice, because we increased it above */
+ mptcp_mpcb_put(mpcb); + mptcp_mpcb_put(mpcb);