Skip to content

Commit

Permalink
net/hamradio/6pack: remove redundant check in sp_encaps()
Browse files Browse the repository at this point in the history
"len > sp->mtu" checked twice in a row in sp_encaps().
Remove the second check.

Signed-off-by: Denis Efremov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
evdenis authored and davem330 committed Mar 5, 2021
1 parent abbf9a0 commit 85554bc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
goto out_drop;
}

if (len > sp->mtu) { /* sp->mtu = AX25_MTU = max. PACLEN = 256 */
msg = "oversized transmit packet!";
goto out_drop;
}

if (p[0] > 5) {
msg = "invalid KISS command";
goto out_drop;
Expand Down

0 comments on commit 85554bc

Please sign in to comment.