From: Joe Perches <joe@perches.com>
To: "Catalin(ux) M. BOIE" <catab@embedromix.ro>
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org,
yoshfuji@linux-ipv6.org, davem@davemloft.net
Subject: Re: [PATCH] Do not drop DNATed 6to4/6rd packets (v4)
Date: Mon, 23 Sep 2013 12:11:25 -0700 [thread overview]
Message-ID: <1379963485.3575.53.camel@joe-AO722> (raw)
In-Reply-To: <1379961413-21005-1-git-send-email-catab@embedromix.ro>
On Mon, 2013-09-23 at 21:36 +0300, Catalin(ux) M. BOIE wrote:
> From: "Catalin(ux) M. BOIE" <catab@embedromix.ro>
>
> When a router is doing DNAT for 6to4/6rd packets the latest anti-spoofing
> patch (218774dc) will drop them because the IPv6 address embedded
> does not match the IPv4 destination. This patch will allow them to
> pass by testing if we have an address that matches on 6to4/6rd interface.
> I have been hit by this problem using Fedora and IPV6TO4_IPV4ADDR.
> Also, log the dropped packets (with rate limit).
A few more trivialities:
When you send revisions to patches, please put the
revision number inside the brackets like:
[PATCH V4] subject
Also, use a prefix for the patch like:
[PATCH V4] IPv6 NAT: Don't drop DNAT 6to4 or 6RD packets
> diff --git a/include/net/addrconf.h b/include/net/addrconf.h
[]
> @@ -67,6 +67,10 @@ int ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
> int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr);
> #endif
>
> +extern bool ipv6_chk_custom_prefix(const struct in6_addr *addr,
> + const unsigned int prefix_len,
> + struct net_device *dev);
> +
extern isn't required.
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
[]
> @@ -566,6 +566,70 @@ static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr,
[]
> +/* Returns true if a packet is spoofed */
> +static bool packet_is_spoofed(struct sk_buff *skb,
> + const struct iphdr *iph,
> + struct ip_tunnel *tunnel)
> +{
[]
> + if ((tunnel->dev->flags & IFF_POINTOPOINT))
> + return false;
One too many parentheses
if (tunnel->dev->flags & IFF_POINTTOPOINT)
return false;
next prev parent reply other threads:[~2013-09-23 19:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-14 10:30 [PATCH] Do not drop DNATed 6to4/6rd packets Catalin(ux) M. BOIE
2013-09-15 13:14 ` Hannes Frederic Sowa
2013-09-22 10:58 ` Catalin(ux) M. BOIE
2013-09-22 17:01 ` Joe Perches
2013-09-23 18:31 ` catab
2013-09-23 18:33 ` [PATCH] Do not drop DNATed 6to4/6rd packets (v3) Catalin(ux) M. BOIE
2013-09-23 18:36 ` [PATCH] Do not drop DNATed 6to4/6rd packets catab
2013-09-23 18:36 ` [PATCH] Do not drop DNATed 6to4/6rd packets (v4) Catalin(ux) M. BOIE
2013-09-23 19:11 ` Joe Perches [this message]
2013-09-23 20:04 ` [PATCH v5] IPv6 NAT: Do not drop DNATed 6to4/6rd packets Catalin(ux) M. BOIE
2013-09-24 21:36 ` Hannes Frederic Sowa
2013-09-28 19:57 ` David Miller
2013-09-29 0:24 ` Joe Perches
2013-09-30 3:05 ` catab
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=1379963485.3575.53.camel@joe-AO722 \
--to=joe@perches.com \
--cc=catab@embedromix.ro \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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).