[WireGuard] [PATCH] go test: add ICMP ping

Jason A. Donenfeld Jason at zx2c4.com
Thu Jul 7 13:44:34 CEST 2016


On Thu, Jul 7, 2016 at 12:20 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
> This is awesome. What fun it was making this yesterday. A couple nits, however:
>
> On Thu, Jul 7, 2016 at 4:57 AM, Jonathan Rudenberg
> <jonathan at titanous.com> wrote:
>> +               Checksum: 0xa15b, // the packet is always the same, hard-code checksum
>
> Isn't there some Go lib we can use to calculate this for us?

https://git.zx2c4.com/WireGuard/commit/?id=42451879597f58ef6cdd74284c9629c12631d14d
Done.

>> +       if echo.ID != 1 || echo.Seq != 1 || string(echo.Data) != "WireGuard" {
>
> Can we set ID and Seq to random numbers, and check that we get them back here?

https://git.zx2c4.com/WireGuard/commit/?id=df68121676a70b325993e3bfdd51dce4c6bc65eb
Done.


More information about the WireGuard mailing list