diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-09-19 09:47:01 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-09-19 09:47:01 +0000 |
commit | bb8b5d4b99990427fccc898f94ae8e3d82fc5b40 (patch) | |
tree | b0dcd81780e0f86d89128d9a4d22e5fb22a4f756 | |
parent | 199c6d3972eca569656b2b1931491536cb20c427 (diff) |
Fix ICMP checks by setting the socklen correctly before calling recvfrom().
ok benno@
-rw-r--r-- | usr.sbin/relayd/check_icmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/check_icmp.c b/usr.sbin/relayd/check_icmp.c index df017f01a5f..7a38487c1d6 100644 --- a/usr.sbin/relayd/check_icmp.c +++ b/usr.sbin/relayd/check_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_icmp.c,v 1.31 2011/05/09 12:08:47 reyk Exp $ */ +/* $OpenBSD: check_icmp.c,v 1.32 2012/09/19 09:47:00 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -279,6 +279,7 @@ recv_icmp(int s, short event, void *arg) bzero(&packet, sizeof(packet)); bzero(&ss, sizeof(ss)); + slen = sizeof(ss); r = recvfrom(s, packet, sizeof(packet), 0, (struct sockaddr *)&ss, &slen); |