developer | 655d8f0 | 2024-01-11 13:37:13 +0800 | [diff] [blame] | 1 | --- a/drivers/net/ppp/pptp.c |
| 2 | +++ b/drivers/net/ppp/pptp.c |
| 3 | @@ -308,6 +308,15 @@ static int pptp_rcv_core(struct sock *sk |
| 4 | (PPP_PROTOCOL(payload) == PPP_LCP) && |
| 5 | ((payload[4] == PPP_LCP_ECHOREQ) || (payload[4] == PPP_LCP_ECHOREP))) |
| 6 | goto allow_packet; |
| 7 | + |
| 8 | + /* |
| 9 | + * Updating seq_recv and checking seq of data packets causes |
| 10 | + * severe packet drop in multi-core scenario. It is bypassed |
| 11 | + * here as a workaround solution. |
| 12 | + */ |
| 13 | + if ((payload[0] == PPP_ALLSTATIONS) && (payload[1] == PPP_UI) && |
| 14 | + !PPP_PROTOCOL_CTRL(payload)) |
| 15 | + goto allow_packet; |
| 16 | } else { |
| 17 | opt->seq_recv = seq; |
| 18 | allow_packet: |
| 19 | --- a/include/uapi/linux/ppp_defs.h |
| 20 | +++ b/include/uapi/linux/ppp_defs.h |
| 21 | @@ -23,6 +23,7 @@ |
| 22 | #define PPP_ADDRESS(p) (((__u8 *)(p))[0]) |
| 23 | #define PPP_CONTROL(p) (((__u8 *)(p))[1]) |
| 24 | #define PPP_PROTOCOL(p) ((((__u8 *)(p))[2] << 8) + ((__u8 *)(p))[3]) |
| 25 | +#define PPP_PROTOCOL_CTRL(p) (PPP_PROTOCOL(p) & 0xF000) |
| 26 | |
| 27 | /* |
| 28 | * Significant octet values. |