public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] icmp: Set sin6_scope_id for outbound ICMPv6 echo requests
Date: Thu, 13 Oct 2022 12:11:04 +1100	[thread overview]
Message-ID: <Y0dlqGZ/Lax4dXyq@yekko> (raw)
In-Reply-To: <20221012154530.1650534-1-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

On Wed, Oct 12, 2022 at 05:45:30PM +0200, Stefano Brivio wrote:
> If we ping a link-local address, we need to pass this to sendto(), as
> it will obviously fail with -EINVAL otherwise.
> 
> If we ping other addresses, it's probably a good idea anyway to
> specify the configured outbound interface here.
> 
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  icmp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/icmp.c b/icmp.c
> index 6bd87fd..21ea2d7 100644
> --- a/icmp.c
> +++ b/icmp.c
> @@ -192,6 +192,7 @@ int icmp_tap_handler(const struct ctx *c, int af, const void *addr,
>  		struct sockaddr_in6 sa = {
>  			.sin6_family = AF_INET6,
>  			.sin6_addr = IN6ADDR_ANY_INIT,
> +			.sin6_scope_id = c->ifi6,
>  		};
>  		struct icmp6hdr *ih;
>  		int id, s;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-10-13  4:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 15:45 [PATCH] icmp: Set sin6_scope_id for outbound ICMPv6 echo requests Stefano Brivio
2022-10-13  1:11 ` David Gibson [this message]

Reply instructions:

You may reply publicly 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=Y0dlqGZ/Lax4dXyq@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).