[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 3/7] networking: Fall back on IPPROTO_RAW when SOL_RAW is not defined
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2017-10-30 13:53:50
Message-ID: CAK1hOcOuWy-kxp0QDGmi7S6F9x-CZoDTE147SawyEax2D2+mcg () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Sat, Oct 7, 2017 at 7:53 PM, James Clarke <jrtc27@jrtc27.com> wrote:
> Signed-off-by: James Clarke <jrtc27@jrtc27.com>
> ---
>  networking/ping.c       | 8 ++++++++
>  networking/traceroute.c | 8 ++++++++
>  2 files changed, 16 insertions(+)
>
> diff --git a/networking/ping.c b/networking/ping.c
> index 774f8f3e0..d1d59d545 100644
> --- a/networking/ping.c
> +++ b/networking/ping.c
> @@ -135,6 +135,14 @@
>  # define ICMP_ADDRESSREPLY   18  /* Address Mask Reply    */
>  #endif
>
> +/* Some operating systems, like GNU/Hurd, don't define SOL_RAW, but do have
> + * IPPROTO_RAW. Since the IPPROTO definitions are also valid to use for
> + * setsockopt (and take the same value as their corresponding SOL definitions,
> + * if they exist), we can just fall back on IPPROTO_RAW. */
> +#ifndef SOL_RAW
> +# define SOL_RAW IPPROTO_RAW
> +#endif
> +
>  #if ENABLE_PING6
>  # include <netinet/icmp6.h>
>  /* I see RENUMBERED constants in bits/in.h - !!?
> diff --git a/networking/traceroute.c b/networking/traceroute.c
> index 8b6247482..df7122047 100644
> --- a/networking/traceroute.c
> +++ b/networking/traceroute.c
> @@ -323,6 +323,14 @@
>  # define IPPROTO_IP 0
>  #endif
>
> +/* Some operating systems, like GNU/Hurd, don't define SOL_RAW, but do have
> + * IPPROTO_RAW. Since the IPPROTO definitions are also valid to use for
> + * setsockopt (and take the same value as their corresponding SOL definitions,
> + * if they exist), we can just fall back on IPPROTO_RAW. */
> +#ifndef SOL_RAW
> +# define SOL_RAW IPPROTO_RAW
> +#endif
> +
>
>  #define OPT_STRING \
>         "FIlnrdvxt:i:m:p:q:s:w:z:f:" \
> --
> 2.14.1
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic