aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-11-26 23:42:21 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-26 23:42:21 -0500
commit0b42f25d2f123bb7fbd3565d003a8ea9e1e810fe (patch)
tree77856ad061e97e86027df1fa6efdf20a9fe309b5 /net/tipc
parente5f12b3f5ebb8a6ffd3864a04f687ea0ef78a48a (diff)
parentd8e435f3ab6fea2ea324dce72b51dd7761747523 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
udplite conflict is resolved by taking what 'net-next' did which removed the backlog receive method assignment, since it is no longer necessary. Two entries were added to the non-priv ethtool operations switch statement, one in 'net' and one in 'net-next, so simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c5
-rw-r--r--net/tipc/monitor.c10
-rw-r--r--net/tipc/socket.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 1055164c6232..ecc12411155e 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1492,8 +1492,9 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
1492 if (in_range(peers_tol, TIPC_MIN_LINK_TOL, TIPC_MAX_LINK_TOL)) 1492 if (in_range(peers_tol, TIPC_MIN_LINK_TOL, TIPC_MAX_LINK_TOL))
1493 l->tolerance = peers_tol; 1493 l->tolerance = peers_tol;
1494 1494
1495 if (peers_prio && in_range(peers_prio, TIPC_MIN_LINK_PRI, 1495 /* Update own prio if peer indicates a different value */
1496 TIPC_MAX_LINK_PRI)) { 1496 if ((peers_prio != l->priority) &&
1497 in_range(peers_prio, 1, TIPC_MAX_LINK_PRI)) {
1497 l->priority = peers_prio; 1498 l->priority = peers_prio;
1498 rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT); 1499 rc = tipc_link_fsm_evt(l, LINK_FAILURE_EVT);
1499 } 1500 }
diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c
index ed97a5876ebe..9e109bb1a207 100644
--- a/net/tipc/monitor.c
+++ b/net/tipc/monitor.c
@@ -455,14 +455,14 @@ void tipc_mon_rcv(struct net *net, void *data, u16 dlen, u32 addr,
455 int i, applied_bef; 455 int i, applied_bef;
456 456
457 state->probing = false; 457 state->probing = false;
458 if (!dlen)
459 return;
460 458
461 /* Sanity check received domain record */ 459 /* Sanity check received domain record */
462 if ((dlen < new_dlen) || ntohs(arrv_dom->len) != new_dlen) { 460 if (dlen < dom_rec_len(arrv_dom, 0))
463 pr_warn_ratelimited("Received illegal domain record\n"); 461 return;
462 if (dlen != dom_rec_len(arrv_dom, new_member_cnt))
463 return;
464 if ((dlen < new_dlen) || ntohs(arrv_dom->len) != new_dlen)
464 return; 465 return;
465 }
466 466
467 /* Synch generation numbers with peer if link just came up */ 467 /* Synch generation numbers with peer if link just came up */
468 if (!state->synched) { 468 if (!state->synched) {
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 4916d8fea328..333c5dae0072 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -184,7 +184,7 @@ static struct tipc_sock *tipc_sk(const struct sock *sk)
184 184
185static bool tsk_conn_cong(struct tipc_sock *tsk) 185static bool tsk_conn_cong(struct tipc_sock *tsk)
186{ 186{
187 return tsk->snt_unacked >= tsk->snd_win; 187 return tsk->snt_unacked > tsk->snd_win;
188} 188}
189 189
190/* tsk_blocks(): translate a buffer size in bytes to number of 190/* tsk_blocks(): translate a buffer size in bytes to number of