From: Alin Nastac <alin.nastac@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH] ipv6: fix icmp6_send() route lookup
Date: Thu, 7 Feb 2019 16:05:31 +0100 [thread overview]
Message-ID: <1549551931-11909-1-git-send-email-alin.nastac@gmail.com> (raw)
Original packet destination address must be used as saddr for the
route lookup performed by icmp6_send() even when this address is
not local. This fixes the IPv6 router ability to send back
destination unreachable ICMPv6 errors for forwarded packets when
the route toward the saddr of the original packet is source
filtered (e.g. a default route with a "from PD" attribute, where
PD is the delegated prefix).
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
---
net/ipv6/icmp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index bbcdfd2..8f17065 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -455,8 +455,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
*/
addr_type = ipv6_addr_type(&hdr->daddr);
- if (ipv6_chk_addr(net, &hdr->daddr, skb->dev, 0) ||
- ipv6_chk_acast_addr_src(net, skb->dev, &hdr->daddr))
+ if (!force_saddr)
saddr = &hdr->daddr;
/*
--
2.7.4
next reply other threads:[~2019-02-07 15:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 15:05 Alin Nastac [this message]
2019-02-11 20:38 ` [PATCH] ipv6: fix icmp6_send() route lookup David Miller
2019-02-12 3:31 ` Ivan Delalande
2019-02-12 14:13 ` Alin Năstac
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=1549551931-11909-1-git-send-email-alin.nastac@gmail.com \
--to=alin.nastac@gmail.com \
--cc=netdev@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).