aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorMasahide NAKAMURA <nakam@linux-ipv6.org>2006-11-24 23:34:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-11-25 18:16:52 -0500
commit9abbffee861c6c56fce27e4eda96a10cf0de0f84 (patch)
tree2b5e1e86913daa2bb11ca142f309485a25288510 /net/xfrm
parentdc9b334622bff6d22456917a034c2e2d194b9328 (diff)
[XFRM] STATE: Fix to respond error to get operation if no matching entry exists.
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index c4cde57d9216..2ee14f8a1908 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -495,6 +495,7 @@ static struct xfrm_state *xfrm_user_state_lookup(struct xfrm_usersa_id *p,
495 goto out; 495 goto out;
496 } 496 }
497 497
498 err = -ESRCH;
498 x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto, 499 x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto,
499 p->family); 500 p->family);
500 } 501 }