Linux-WPAN Archive on lore.kernel.org
 help / color / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Stefan Schmidt <stefan@datenfreihafen.org>
Cc: linux-wpan - ML <linux-wpan@vger.kernel.org>
Subject: Re: [PATCH rpld 2/6] send: make sure we check on scope id usage
Date: Fri, 20 Dec 2019 17:52:21 -0500
Message-ID: <CAB_54W7a8gsqWsSf-V9DjbhmKvqhwCVRu2z6dWDOSR3mp5zLLw@mail.gmail.com> (raw)
In-Reply-To: <20190918195819.7492-3-stefan@datenfreihafen.org>

Hi Stefan,,

On Wed, 18 Sep 2019 at 15:58, Stefan Schmidt <stefan@datenfreihafen.org> wrote:
>
> It fails on my machine and likely fails on others, better
> check for it.
> ---
>  send.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/send.c b/send.c
> index 97c566d..d026f6a 100644
> --- a/send.c
> +++ b/send.c
> @@ -53,11 +53,9 @@ static int really_send(int sock, const struct iface *iface,
>         pkt_info->ipi6_ifindex = iface->ifindex;
>         memcpy(&pkt_info->ipi6_addr, iface->ifaddr_src, sizeof(struct in6_addr));
>
> -#if 1
> -//#ifdef HAVE_SIN6_SCOPE_ID
> +#ifdef HAVE_SIN6_SCOPE_ID

This HAVE_ stuff is from autoconf where I took the code (radvd), so
this will mostly end in #ifdef 0 because we use meson now and don't
ask me how to check on this in meson but it's simple I think. :-)
I think we can remove this code and see if we break something. The
point here radvd is ported to BSD, Linux, etc. and this is some system
thing. _Maybe_ it is really not necessary for Linux systems _because_
we set above "pkt_info->ipi6_ifindex = iface->ifindex;" which is maybe
enough on a Linux system... but it could also be to solve some UAPI
messup.... just remove it. In a scope of link-local we must set the
interface somehow, I am not sure how the correct API works here, as I
said... look if it makes problems. Sorry but it means: I am too lazy
too look it up why this is necessary in radvd (git blame is maybe
enough?).

Note: That it compiles on my Linux machine and not on your Linux
machine, means there is something in Linux API headers.

- Alex

       reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190918195819.7492-1-stefan@datenfreihafen.org>
     [not found] ` <20190918195819.7492-3-stefan@datenfreihafen.org>
2019-12-20 22:52   ` Alexander Aring [this message]
2019-12-20 23:06 ` [PATCH rpld 0/6] Mixed bag of rpld patches Alexander Aring
2019-12-22 22:07   ` Stefan Schmidt
2020-01-09 22:38 ` Alexander Aring
2020-01-10  8:54   ` Stefan Schmidt

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB_54W7a8gsqWsSf-V9DjbhmKvqhwCVRu2z6dWDOSR3mp5zLLw@mail.gmail.com \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=stefan@datenfreihafen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-WPAN Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
		linux-wpan@vger.kernel.org
	public-inbox-index linux-wpan

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git