diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-04-20 00:36:52 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-04-20 00:36:52 +0000 |
commit | e3a43115edafc4c3a5181ced76e350863af89a44 (patch) | |
tree | 46d4528abe8795c4e00744d8dd80975def0544df /sbin | |
parent | 9bd9d7bd97963e63da6a89be7e135b81f230c2e3 (diff) |
fold the icmp seq number into the mac.
i dont know why i missed this before.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ping/ping.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 7ce9b4bbb07..766bce764f5 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.120 2015/04/19 12:56:42 dlg Exp $ */ +/* $OpenBSD: ping.c,v 1.121 2015/04/20 00:36:51 dlg Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -648,6 +648,7 @@ pinger(void) SipHash24_Init(&ctx, &mac_key); SipHash24_Update(&ctx, tv64, sizeof(*tv64)); SipHash24_Update(&ctx, &ident, sizeof(ident)); + SipHash24_Update(&ctx, &icp->icmp_seq, sizeof(icp->icmp_seq)); SipHash24_Update(&ctx, &whereto.sin_addr, sizeof(whereto.sin_addr)); SipHash24_Final(&payload.mac, &ctx); @@ -747,6 +748,8 @@ pr_pack(char *buf, int cc, struct sockaddr_in *from) SipHash24_Init(&ctx, &mac_key); SipHash24_Update(&ctx, tv64, sizeof(*tv64)); SipHash24_Update(&ctx, &ident, sizeof(ident)); + SipHash24_Update(&ctx, &icp->icmp_seq, + sizeof(icp->icmp_seq)); SipHash24_Update(&ctx, &whereto.sin_addr, sizeof(whereto.sin_addr)); SipHash24_Final(mac, &ctx); |