mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "tipc: do not update mtu if msg_max is too small in mtu negotiation"
This reverts commit 259683001d.
It breaks the Android KABI and will be brought back at a later time when
it is safe to do so.
Bug: 161946584
Change-Id: I4666e57ed5637ba314fd5399d78bb5750f29506a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2200,7 +2200,7 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
|
|||||||
struct tipc_msg *hdr = buf_msg(skb);
|
struct tipc_msg *hdr = buf_msg(skb);
|
||||||
struct tipc_gap_ack_blks *ga = NULL;
|
struct tipc_gap_ack_blks *ga = NULL;
|
||||||
bool reply = msg_probe(hdr), retransmitted = false;
|
bool reply = msg_probe(hdr), retransmitted = false;
|
||||||
u32 dlen = msg_data_sz(hdr), glen = 0, msg_max;
|
u32 dlen = msg_data_sz(hdr), glen = 0;
|
||||||
u16 peers_snd_nxt = msg_next_sent(hdr);
|
u16 peers_snd_nxt = msg_next_sent(hdr);
|
||||||
u16 peers_tol = msg_link_tolerance(hdr);
|
u16 peers_tol = msg_link_tolerance(hdr);
|
||||||
u16 peers_prio = msg_linkprio(hdr);
|
u16 peers_prio = msg_linkprio(hdr);
|
||||||
@@ -2239,9 +2239,6 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
|
|||||||
switch (mtyp) {
|
switch (mtyp) {
|
||||||
case RESET_MSG:
|
case RESET_MSG:
|
||||||
case ACTIVATE_MSG:
|
case ACTIVATE_MSG:
|
||||||
msg_max = msg_max_pkt(hdr);
|
|
||||||
if (msg_max < tipc_bearer_min_mtu(l->net, l->bearer_id))
|
|
||||||
break;
|
|
||||||
/* Complete own link name with peer's interface name */
|
/* Complete own link name with peer's interface name */
|
||||||
if_name = strrchr(l->name, ':') + 1;
|
if_name = strrchr(l->name, ':') + 1;
|
||||||
if (sizeof(l->name) - (if_name - l->name) <= TIPC_MAX_IF_NAME)
|
if (sizeof(l->name) - (if_name - l->name) <= TIPC_MAX_IF_NAME)
|
||||||
@@ -2286,8 +2283,8 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
|
|||||||
l->peer_session = msg_session(hdr);
|
l->peer_session = msg_session(hdr);
|
||||||
l->in_session = true;
|
l->in_session = true;
|
||||||
l->peer_bearer_id = msg_bearer_id(hdr);
|
l->peer_bearer_id = msg_bearer_id(hdr);
|
||||||
if (l->mtu > msg_max)
|
if (l->mtu > msg_max_pkt(hdr))
|
||||||
l->mtu = msg_max;
|
l->mtu = msg_max_pkt(hdr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_MSG:
|
case STATE_MSG:
|
||||||
|
|||||||
Reference in New Issue
Block a user