summaryrefslogtreecommitdiff
path: root/sbin/ping6
AgeCommit message (Collapse)Author
2016-08-30summary() is no longer called from a signal handler, so it can useTheo de Raadt
stdio and does not need the workarounds. ok florian millert
2016-08-30Avoid calling summary() from a signal handler. This will allow usTodd C. Miller
to go back to using stdio there. OK florian@ deraadt@
2016-08-30Make sure to not decrease packet size when running with -v.Florian Obser
OK benno
2016-08-30usage() is __dead.Florian Obser
While here remove one useless call to usage() that's covered by the very next line.
2016-08-30Add destination IP to MAC, reduces difference to ping(8).Florian Obser
2016-03-03ping(8) and ping6(8) use different types for packet counters. InFlorian Obser
preparation of a merge just use int64_t and be done with it. OK deraadt
2016-01-30ping, ping6: corrects -E (audible beep when no packet is received before theSebastien Marie
next packet is transmitted) regression with help and ok florian@
2016-01-28malloc(3) returns a pointer, so check against NULL, not 0. (No functional ↵Gleydson Soares
change) OK millert@
2015-11-29Reimplement source address selection. Inspired by the previousFlorian Obser
traceroute / traceroute6 merge. Next step in unification. OK benno@
2015-11-29Doubles are not reals. Imprecision might lead to trying toFlorian Obser
calculate square root of a negative number. Just use 0 in this case. Pointed out by and fix from Nathanael Rensen ( nathanael AT list DOT polymorpheus DOT com ), thanks! OK deraadt@ (Funnily this bug was in ping6 for many years, only discovered once I synced ping to the ping6 implementation recently.)
2015-11-10Reduce diff between ping and ping6.Florian Obser
- increase MAX_DUP_CHK in ping to ping6' value, we should have enough ram these days. - sync -l, -s and -V option handling - rename MAXDATALEN to MAXPAYLOAD in ping6 no (intendet) functional change. OK benno@
2015-11-05Whitespace, reduce diff to ping.Florian Obser
2015-11-05Cleanup includes.Florian Obser
guenther@ and kettenis@ confirmed that while not strictly necessary on OpenBSD we should include both time.h and sys/time.h.
2015-11-04replace setbuf with setvbuf, from Frederic NowakTed Unangst
2015-11-04Simplify packet option handling since we are only setting one optionFlorian Obser
these days.
2015-11-04dead store; pointed out by llvmFlorian Obser
2015-10-25pr_bitrange() is unused, nuke it.Florian Obser
2015-10-25remove prototype for removed pingerlen function.Florian Obser
2015-10-25IPV6_NEXTHOP is gone, remove -g option which used this.Florian Obser
kill it mpi@
2015-10-25tweak previous;Jason McIntyre
2015-10-25Implement ping(8)'s -L option in ping6:Florian Obser
Disable the loopback, so the transmitting host doesn't see the ICMP requests. For multicast pings. OK benno@
2015-10-24Inline trivial myechoreply function in the one place it's used; likeFlorian Obser
ping(8).
2015-10-24nonce is unused.Florian Obser
2015-10-24Sync ping6 output to ping. ping has been around for longer and soFlorian Obser
defines the canonical output format. Having different output is getting in the way of a merge. This moves the output of the src address to the -v option. With the overly complicated IPv6 address selection it's sometimes usefull to have this information. OK benno@, sthen@ can live with it.
2015-10-17make usage() less horribleFlorian Obser
2015-10-17Implement -w maxwait now that the -w flag is free in ping6. SameFlorian Obser
behaviour as ping(8).
2015-10-17move -V option before -v and remove one spurious newline, now in syncFlorian Obser
with ping. No object change.
2015-10-17Remove left over -N and -w. Adapt wording for the link local example.Florian Obser
Pointed out by, input & OK jmc
2015-10-16Remove RFC 4620 support. The RFC is experimental and this code plainFlorian Obser
needs killing before the installed user base excedes 6. Minus 745 LOC. This is getting in the way of a merge since it has it's tentacles all over the place. OK jca@, deraadt@
2015-10-16No longer talk about -b flag, it's gone.Florian Obser
2015-10-16Move -t and -w functionality to -a. Both flags are in the way for aFlorian Obser
merge with ping(8). Let's see if we can shove every weird and special v6 functionality into -a. suggested by and OK sthen@
2015-10-14To specify a source address ping uses -I while ping6 uses -S. SwitchFlorian Obser
ping6 -I to the ping-alike semantics. sthen@ thinks this is OK
2015-10-13Remove -b flag and let ping6 set the socket buffer size automaticallyFlorian Obser
like ping. Suggested by deraadt@, OK dlg
2015-10-12deprecate & remove -W option; ok florianTheo de Raadt
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-04Repair tame() error check to be == -1Theo de Raadt
2015-10-03ping6 is a setuid root priv-drop which holds a sockraw. we can tame itTheo de Raadt
substantially with "stdio inet", plus "dns" if the -n option is missing. a successful exploit against it then cannot create files, or perform a variety of other operations, as described in the tame(2) man page. ping6 is a bit trickier than ping, because it uses recvmsg() with CMSG types of IPV6_HOPOPTS, IPV6_DSTOPTS, IPV6_RTHDRDSTOPTS, IPV6_RTHDR. there is further work to do in the kernel, with claudio! work with florian a while back, which involved hoisting lots of initization code upwards. ok doug
2015-09-30remove old self-kill() in the signal handler. must predate theTheo de Raadt
signal handler audit. found while adapting ping6 to tame. ok kettenis
2015-09-16Some cleanup from dhill AT mindcry.org, thanks!Florian Obser
- remove unused defines - use socklen_t for getnameinfo no object change
2015-09-12typo that breaks the buildChristian Weisgerber
2015-09-12Avoid out of boundary access on invalid or short packet reads.Tobias Stoeckmann
ok florian@
2015-09-09Cleanup the iov handling in ping6. Use the global iov instead of a localClaudio Jeker
version which is then added to a global struct msghdr. Issue found by Michael McConville. OK florian@ tobias@
2015-09-01Display the correct source address when using a non-default routingFlorian Obser
table. Problem reported on bugs@ and diff from phil AT unita.com.au, thanks! OK phessler
2015-08-31remove unused define; no binary changeFlorian Obser
2015-08-31Forgot to commit the man page bits when removing RH0 support.Florian Obser
2015-08-30Clean up getaddrinfo(3) calls to make them look like the canonicalFlorian Obser
example from the man page. While there was nothing wrong this pattern makes it easier to figure that out. While here be more paranoid how much we memcpy(3). Looks clean to deraadt@
2015-08-30Remove RH0 support, it was deprecated in RFC 5095 some time ago andFlorian Obser
you couldn't send packets anyway since our stack drops them unconditionally. reasoning is sound to deraadt@, OK mpi@
2015-05-02Use IPV6_MAXHLIM instead of 255; pointed out by bluhm@Florian Obser
No object change.
2015-05-02Use strtonum() when parsing argument list, as ping(8) does. GiveKenneth R Westerback
or take a cast. Tweak error messages to also be consistant with ping(8). Change lower bound of '-h' to 0 from -1 at the request of florian@. Tweaks and suggestions from, ok florian@
2015-04-20port src/sbin/ping/ping.c r1.119 and r1.121 to ping6:David Gwynne
> add a mac to the timestamp payload and calculate it with siphash. > > this lets us have some confidence that the timestamp hasnt been > damaged or tampered with in transit. > > discussed with jp aumasson > ok florian@