* [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok
@ 2011-06-30 9:18 Steffen Klassert
2011-06-30 9:19 ` [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Steffen Klassert
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Steffen Klassert @ 2011-06-30 9:18 UTC (permalink / raw)
To: David Miller; +Cc: Herbert Xu, netdev
The family arg is not used any more, so remove it.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/xfrm/xfrm_policy.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 9bec2e8..5ce74a3 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -50,7 +50,7 @@ static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family);
static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo);
static void xfrm_init_pmtu(struct dst_entry *dst);
static int stale_bundle(struct dst_entry *dst);
-static int xfrm_bundle_ok(struct xfrm_dst *xdst, int family);
+static int xfrm_bundle_ok(struct xfrm_dst *xdst);
static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
@@ -2241,7 +2241,7 @@ static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie)
static int stale_bundle(struct dst_entry *dst)
{
- return !xfrm_bundle_ok((struct xfrm_dst *)dst, AF_UNSPEC);
+ return !xfrm_bundle_ok((struct xfrm_dst *)dst);
}
void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev)
@@ -2313,7 +2313,7 @@ static void xfrm_init_pmtu(struct dst_entry *dst)
* still valid.
*/
-static int xfrm_bundle_ok(struct xfrm_dst *first, int family)
+static int xfrm_bundle_ok(struct xfrm_dst *first)
{
struct dst_entry *dst = &first->u.dst;
struct xfrm_dst *last;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets
2011-06-30 9:18 [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok Steffen Klassert
@ 2011-06-30 9:19 ` Steffen Klassert
2011-07-02 0:34 ` David Miller
2011-06-30 9:20 ` [PATCH 3/3] xfrm4: Don't call icmp_send on local error Steffen Klassert
2011-07-02 0:34 ` [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Steffen Klassert @ 2011-06-30 9:19 UTC (permalink / raw)
To: David Miller; +Cc: Herbert Xu, netdev
We might call ip_ufo_append_data() for packets that will be IPsec
transformed later. This function should be used just for real
udp packets. So we check for rt->dst.header_len which is only
nonzero on IPsec handling and call ip_ufo_append_data() just
if rt->dst.header_len is zero.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/ip_output.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 4a7e16b..84f26e8 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -828,7 +828,7 @@ static int __ip_append_data(struct sock *sk,
cork->length += length;
if (((length > mtu) || (skb && skb_is_gso(skb))) &&
(sk->sk_protocol == IPPROTO_UDP) &&
- (rt->dst.dev->features & NETIF_F_UFO)) {
+ (rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len) {
err = ip_ufo_append_data(sk, queue, getfrag, from, length,
hh_len, fragheaderlen, transhdrlen,
mtu, flags);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] xfrm4: Don't call icmp_send on local error
2011-06-30 9:18 [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok Steffen Klassert
2011-06-30 9:19 ` [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Steffen Klassert
@ 2011-06-30 9:20 ` Steffen Klassert
2011-07-02 0:34 ` David Miller
2011-07-02 0:34 ` [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Steffen Klassert @ 2011-06-30 9:20 UTC (permalink / raw)
To: David Miller; +Cc: Herbert Xu, netdev
Calling icmp_send() on a local message size error leads to
an incorrect update of the path mtu. So use ip_local_error()
instead to notify the socket about the error.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/xfrm4_output.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
index 2d51840..327a617 100644
--- a/net/ipv4/xfrm4_output.c
+++ b/net/ipv4/xfrm4_output.c
@@ -32,7 +32,12 @@ static int xfrm4_tunnel_check_size(struct sk_buff *skb)
dst = skb_dst(skb);
mtu = dst_mtu(dst);
if (skb->len > mtu) {
- icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
+ if (skb->sk)
+ ip_local_error(skb->sk, EMSGSIZE, ip_hdr(skb)->daddr,
+ inet_sk(skb->sk)->inet_dport, mtu);
+ else
+ icmp_send(skb, ICMP_DEST_UNREACH,
+ ICMP_FRAG_NEEDED, htonl(mtu));
ret = -EMSGSIZE;
}
out:
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok
2011-06-30 9:18 [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok Steffen Klassert
2011-06-30 9:19 ` [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Steffen Klassert
2011-06-30 9:20 ` [PATCH 3/3] xfrm4: Don't call icmp_send on local error Steffen Klassert
@ 2011-07-02 0:34 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-07-02 0:34 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, netdev
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:18:20 +0200
> The family arg is not used any more, so remove it.
>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets
2011-06-30 9:19 ` [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Steffen Klassert
@ 2011-07-02 0:34 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-07-02 0:34 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, netdev
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:19:32 +0200
> We might call ip_ufo_append_data() for packets that will be IPsec
> transformed later. This function should be used just for real
> udp packets. So we check for rt->dst.header_len which is only
> nonzero on IPsec handling and call ip_ufo_append_data() just
> if rt->dst.header_len is zero.
>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] xfrm4: Don't call icmp_send on local error
2011-06-30 9:20 ` [PATCH 3/3] xfrm4: Don't call icmp_send on local error Steffen Klassert
@ 2011-07-02 0:34 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-07-02 0:34 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, netdev
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 30 Jun 2011 11:20:41 +0200
> Calling icmp_send() on a local message size error leads to
> an incorrect update of the path mtu. So use ip_local_error()
> instead to notify the socket about the error.
>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-02 0:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 9:18 [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok Steffen Klassert
2011-06-30 9:19 ` [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Steffen Klassert
2011-07-02 0:34 ` David Miller
2011-06-30 9:20 ` [PATCH 3/3] xfrm4: Don't call icmp_send on local error Steffen Klassert
2011-07-02 0:34 ` David Miller
2011-07-02 0:34 ` [PATCH 1/3] xfrm: Remove family arg from xfrm_bundle_ok David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.