mirror of
				https://github.com/bjdgyc/anylink.git
				synced 2025-11-01 00:59:34 +08:00 
			
		
		
		
	修复 DPD-REQ 协议
This commit is contained in:
		| @@ -75,6 +75,7 @@ func LinkCstp(conn net.Conn, bufRW *bufio.ReadWriter, cSess *sessdata.ConnSessio | ||||
| 		case 0x03: // DPD-REQ | ||||
| 			// base.Debug("recv DPD-REQ", cSess.IpAddr) | ||||
| 			pl.PType = 0x04 | ||||
| 			pl.Data = pl.Data[:n] | ||||
| 			if payloadOutCstp(cSess, pl) { | ||||
| 				return | ||||
| 			} | ||||
| @@ -168,7 +169,7 @@ func cstpWrite(conn net.Conn, bufRW *bufio.ReadWriter, cSess *sessdata.ConnSessi | ||||
| 				binary.BigEndian.PutUint16(pl.Data[4:6], uint16(l)) | ||||
| 			} | ||||
| 		} else { | ||||
| 			pl.Data = append(pl.Data[:0], plHeader...) | ||||
| 			// pl.Data = append(pl.Data[:0], plHeader...) | ||||
| 			// 设置头类型 | ||||
| 			pl.Data[6] = pl.PType | ||||
| 		} | ||||
|   | ||||
| @@ -150,6 +150,7 @@ func dtlsWrite(conn net.Conn, dSess *sessdata.DtlsSession, cSess *sessdata.ConnS | ||||
| 			} | ||||
| 		} else { | ||||
| 			// 设置头类型 | ||||
| 			// pl.Data = append(pl.Data[:0], pl.PType) | ||||
| 			pl.Data[0] = pl.PType | ||||
| 		} | ||||
| 		n, err := conn.Write(pl.Data) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user