Netdev List
 help / color / mirror / Atom feed
* [PATCH] [XFRM] STATE: Fix to respond error to get operation if no matching entry exists.
@ 2006-11-25  4:23 Masahide NAKAMURA
  2006-11-25  4:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Masahide NAKAMURA @ 2006-11-25  4:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, Masahide NAKAMURA, TAKAMIYA Noriaki

When application uses XFRM_MSG_GETSA to get state entry through netlink
socket and kernel has no matching one, the application expects reply
message with error status by kernel.

Kernel doesn't send the message back in the case of Mobile IPv6 route
optimization protocols (i.e. routing header or destination options
header). This is caused by incorrect return code "0" from
net/xfrm/xfrm_user.c(xfrm_user_state_lookup) and it makes kernel skip to
acknowledge at net/netlink/af_netlink.c(netlink_rcv_skb).

This patch fix to reply ESRCH to application.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
---
 net/xfrm/xfrm_user.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index c4cde57..2ee14f8 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -495,6 +495,7 @@ static struct xfrm_state *xfrm_user_stat
 			goto out;
 		}
 
+		err = -ESRCH;
 		x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto,
 					     p->family);
 	}
-- 
1.4.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-25  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-25  4:23 [PATCH] [XFRM] STATE: Fix to respond error to get operation if no matching entry exists Masahide NAKAMURA
2006-11-25  4:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox