diff --git a/ChangeLog b/ChangeLog index 8809ff4..df1a9c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Unreleased (version 3 branch) + * Fix compatibility issue with GNU Hurd + 2017-02-09 David Schweikert * Version 3.16 * (feature) Support kernel-timestamping of received packets (#46) diff --git a/src/fping.c b/src/fping.c index ce71525..6c80653 100644 --- a/src/fping.c +++ b/src/fping.c @@ -562,11 +562,17 @@ int main(int argc, char** argv) if (sscanf(optarg, "%i", &tos)) { #ifndef IPV6 if (setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) { + perror("setting type of service octet IP_TOS"); + } #else +#ifdef IPV6_TCLASS if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos))) { -#endif - perror("setting type of service octet IP_TOS"); + perror("setting type of service octet IPV6_TCLASS"); } +#else + fprintf(stderr, "%s: -O (set TOS) for IPv6 not supported on this platform\n", prog); +#endif +#endif } else { usage(1); }