Simon Josefsson
04c3738a6c
maint: Run 'make update-copyright'.
2025-01-01 18:21:25 +01:00
Collin Funk
183f8d940f
ping, ping6: Fix mistake in previous change.
...
* ping/ping.c (ping_run): Set the timespec to zero if it is negative
before calling pselect.
* ping/ping6.c (ping_run): Likewise.
2024-06-29 17:48:35 -07:00
Collin Funk
b694830a33
ping, ping6: Modernize time functions.
...
* bootstrap.conf (gnulib_modules): Add timespec-add.
* ping/Makefile.am (LDADD): Add $(CLOCK_TIME_LIB),
$(PTHREAD_SIGMASK_LIB), and $(SELECT_LIB).
* ping/libping.c (ping_init): Use current_timespec instead of
gettimeofday.
* ping/ping_common.c (tvsub): Remove function.
(ping_timeout_p): Return a bool. Use timespec_sub and
current_timespec.
* ping/ping_common.h (PING_SET_INTERVAL): Expect a timespec instead of
a timeval.
(struct ping_data): Store the start time in a timespec instead of a
timeval.
(tvsub): Remove declaration.
(ping_timeout_p): Adjust prototype.
* ping/ping.c (send_echo): Use current_timespec.
(ping_init): Likewise.
(ping_run): Likewise. Use pselect.
* ping/ping6.c (send_echo): Use current_timespec.
(print_echo): Likewise.
(ping_init): Likewise.
(ping_run): Likewise. Use pselect.
* ping/ping_echo.c (print_echo): Use current_timespec.
2024-06-26 20:43:41 -07:00
Collin Funk
dd4c077b34
maint: Fix most instances of '-Wstrict-prototypes'.
...
* libinetutils/des_rw.c (des_clear_key, des_read, des_write): Don't
use K&R-style function declarations.
* ifconfig/system/linux.c (pnd_read): Use void instead of an empty
argument list.
* libtelnet/auth.c (auth_status, auth_request, auth_send_retry):
Likewise.
* libtelnet/kerberos5.c (kerberos5_cleanup): Likewise.
* ping/ping.c (ping_run): Likewise.
* ping/ping6.c (ping_run): Likewise.
* ping/ping6.h (ping_run): Likewise.
* ping/ping_impl.h (ping_run): Likewise.
* telnet/authenc.c (net_encrypt, telnet_spin): Likewise.
* telnet/commands.c (_setlist_init, auth_help, EncryptHelp)
(ayt_status): Likewise.
* telnet/sys_bsd.c (TerminalNewMode): Likewise.
* telnet/tn3270.c (outputPurge, Push3270, Finish3270, SetIn3270)
(tn3270_ttype): Likewise.
* telnetd/state.c (willoption): Likewise.
* telnetd/telnetd.h (pty_buffer_level): Likewise.
* telnetd/term.c (term_send_eof, term_change_eof, tty_linemode)
(tty_isecho, tty_flowmode, tty_restartany, tty_israw)
(tty_isbinaryin, tty_isbinaryout, tty_isediting, tty_istrapsig)
(tty_issofttab, tty_islitecho, tty_iscrnl, copy_termbuf): Likewise.
* telnetd/termstat.c (termstat, _termstat): Likewise.
* telnetd/utility.c (net_encrypt, telnet_spin): Likewise.
* src/rcp.c (krb_realmofhost): Add the parameter type.
* telnet/ring.c (ring_encrypt): Likewise.
* telnet/ring.h (ring_encrypt): Likewise.
2024-05-09 18:51:54 -07:00
Simon Josefsson
aba8d6528e
maint: Run 'make update-copyright'.
2024-01-01 11:28:59 +01:00
Simon Josefsson
2cf199580a
maint: Re-indent using GNU indent 2.2.13.
2023-12-29 18:35:01 +01:00
Simon Josefsson
eb5e59b621
Indent code to fix 'make syntax-check'.
2023-01-09 10:59:12 +01:00
Enrik Berkhan
c2cfa7889c
ping: decode unreachable codes added in RFC 4443
...
RFC 4443 added two new codes for ICMPv6 destination unreachable messages
(type 1):
5 - Source address failed ingress/egress policy
6 - Reject route to destination
Before:
$ sudo ./ping/ping6 2a03:4000:54:b9a::5
PING 2a03:4000:54:b9a::5 (2a03:4000:54:b9a::5): 56 data bytes
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Unknown code 6
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Unknown code 6
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Unknown code 6
^C--- 2a03:4000:54:b9a::5 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
After:
$ sudo ./ping/ping6 2a03:4000:54:b9a::5
PING 2a03:4000:54:b9a::5 (2a03:4000:54:b9a::5): 56 data bytes
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Reject route to destination
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Reject route to destination
64 bytes from 2a03:4000:54:b9a::5: Destination unreachable: Reject route to destination
^C--- 2a03:4000:54:b9a::5 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
Signed-off-by: Enrik Berkhan <Enrik.Berkhan@inka.de >
Signed-off-by: Simon Josefsson <simon@josefsson.org >
Copyright-paperwork-exempt: Yes
2023-01-09 10:07:57 +01:00
Simon Josefsson
4bfe18d36f
maint: Run 'make update-copyright'.
2023-01-01 01:37:41 +01:00
Simon Josefsson
c1b8d134d5
Indent code.
2022-10-26 00:03:45 +02:00
Alfred M. Szmidt
6d519229fa
Happy GNU 2022 year!
2022-01-01 17:23:02 +01:00
Simon Josefsson
1d5c923528
maint: Use copyright year ranges for readability.
...
* cfg.mk (update-copyright-env): Add, from coreutils.
(VC_LIST_ALWAYS_EXCLUDE_REGEX): Add, for update-copyright exceptions.
* README: Add info about copyright year ranges.
* *: Update copyright notices.
2021-09-03 18:41:09 +02:00
Simon Josefsson
0ceee23262
Use gnulib module 'attribute' instead of obsolete 'snippets/unused-parameters'.
...
* */*.c: Use MAYBE_UNUSED instead of _GL_UNUSED_PARAMETER.
* */*.c: Include attribute.h instead of unused-parameters.h.
2021-09-01 22:49:18 +02:00
Simon Josefsson
a68717a4e5
ping6: Don't allow unprivileged users to flood ping.
...
* ping/ping6.c (parse_opt): For non-root users, limit interval
like ping.c to avoid DoS. Reported in
<https://bugs.debian.org/926750 >.
* ping/ping_common.h (PING_MIN_USER_INTERVAL): Add.
* ping/ping.c (MIN_USER_INTERVAL): Remove, replaced by
PING_MIN_USER_INTERVAL.
(parse_opt): Update use.
2021-01-29 09:06:56 +01:00
Simon Josefsson
3ce348e63c
Use error instead of exit. Add ChangeLog entry for previous commit.
2021-01-28 15:40:40 +01:00
Jay
02a379763b
patching unchecked setuid in ping.c and ping6.c
...
Signed-off-by: Simon Josefsson <simon@josefsson.org >
2021-01-28 15:38:19 +01:00
Alfred M. Szmidt
911413ea57
Happy GNU 2021 year!
2021-01-01 11:35:27 +01:00
Mats Erik Andersson
705750b8b4
Support for libidn2 in addition to libidn.
...
Prefer libidn2 when both are present and usable.
2020-04-05 16:21:30 +02:00
Alfred M. Szmidt
2117c3140a
ping/ping6.c (print_packet_too_big): Use %u when printing MTU.
2020-04-04 23:27:35 +02:00
Tim Rühsen
a09e3d7c7d
ping, ping6: Silence -Wimplicit-fallthrough
2020-02-29 18:40:41 +01:00
Tim Rühsen
4747b63d70
ping6: Fix memleak in ping_set_dest
2020-02-29 18:37:20 +01:00
Simon Josefsson
d8de4587f2
Update copyright years to use intervals up to 2020.
2020-01-01 13:21:37 +01:00
Mats Erik Andersson
3d64a8c728
Update copyright years to 2017. (silent change)
2017-02-21 14:25:23 +01:00
Mats Erik Andersson
84dcf08568
Update copyright years to 2016. (silent change)
2016-01-22 19:09:49 +01:00
Guillem Jover
4858b4e340
ping, ping6: Always use line buffered output.
...
Standard behaviour is to use line buffered output
even when redirecting output in a pipe.
2015-05-13 22:29:12 +02:00
Mats Erik Andersson
d3c9b1b8fa
Update copyright years with 2015. (silent change)
2015-01-16 14:09:44 +01:00
Mats Erik Andersson
a2128965cb
Support libshishi with Sun Studio.
...
Detect libshishi in a manner that allows Sun Studio
to fully recognize its presence, and build with it.
2014-08-03 14:16:14 +02:00
Mats Erik Andersson
2a7913b375
ping, ping6: Repair pattern production.
2014-08-01 14:28:36 +02:00
Mats Erik Andersson
8c7a55e6eb
Portability of canonical host name.
...
For a numerical host name, getaddrinfo() need not set
a value for `ai_canonname'. Protect against this.
Problem was uncovered by a system running OpenBSD 5.5.
2014-07-17 23:45:05 +02:00
Mats Erik Andersson
ae85332551
Update copyright years with 2014. (silent change)
2014-01-18 12:23:21 +01:00
Mats Erik Andersson
309ba4a541
Portability of Unix macros.
2013-08-30 15:56:19 +02:00
Mats Erik Andersson
d1d52cce92
Update copyright years with 2013. (silent change)
2013-05-22 21:03:41 +02:00
Mats Erik Andersson
c39250371e
More IDN support for clients.
2013-04-04 14:28:37 +02:00
Mats Erik Andersson
63f4ad499f
ping6: More options.
2013-01-17 14:33:05 +01:00
Mats Erik Andersson
3853b33cf3
ping6: Verbose packet info.
2013-01-17 02:20:22 +01:00
Mats Erik Andersson
ba47e90656
ping, ping6: Error handling.
2013-01-16 11:25:11 +01:00
Mats Erik Andersson
d3771eb02d
ping, traceroute: IDN for glibc.
2012-10-04 22:24:15 +02:00
Mats Erik Andersson
64d135fa07
ping, ping6: Compiler warnings.
2012-09-13 21:59:14 +02:00
Mats Erik Andersson
8042e80fa1
traceroute: Support IDN named hosts.
...
Cover compiler warnings in ping, ping6, inetd.
2012-09-07 16:46:30 +02:00
Mats Erik Andersson
3841619d01
ping, ping6: Support IDN named hosts.
2012-08-31 17:55:24 +02:00
Mats Erik Andersson
8aebed7912
ping, ping6: Refactor common resolver.
2012-05-10 23:33:06 +02:00
Mats Erik Andersson
dd74888217
ping, ping6: Additional verbosity.
2012-05-10 23:30:31 +02:00
Mats Erik Andersson
d2474314ec
ping, ping6: Time-to-live, hoplimit.
2012-05-09 03:28:35 +02:00
Mats Erik Andersson
24f0cb0538
ping, ping6: Critical sizing errors.
2012-05-08 18:56:38 +02:00
Mats Erik Andersson
b1410c18b8
libicmp, ping, ping6: Endianness conversions.
2012-05-08 18:54:08 +02:00
Mats Erik Andersson
1dc2e02ed0
ping, ping6, traceroute: Portability and regression.
2012-05-08 18:48:29 +02:00
Mats Erik Andersson
3aae672f30
ping, ping6, traceroute: 64-bit portability issues.
2012-04-20 14:04:36 +02:00
Mats Erik Andersson
05157b367d
ping,ping6: Host resolving issues.
2012-03-06 23:51:40 +01:00
Alfred M. Szmidt
99c71142f2
Updated copyright years; happy 2012! (silent change)
2012-01-01 19:27:00 +01:00
Alfred M. Szmidt
1a343be8d0
Fix prohibit_dirent_without_use, sc_unsigned_short, sc_unsigned_long sc_unsigned_char checks.
2011-12-30 18:49:49 +01:00