aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/xfrm_sync.txt5
-rw-r--r--include/linux/xfrm.h2
-rw-r--r--net/xfrm/xfrm_user.c4
3 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/networking/xfrm_sync.txt b/Documentation/networking/xfrm_sync.txt
index 8be626f7c0b8..d7aac9dedeb4 100644
--- a/Documentation/networking/xfrm_sync.txt
+++ b/Documentation/networking/xfrm_sync.txt
@@ -47,10 +47,13 @@ aevent_id structure looks like:
47 47
48 struct xfrm_aevent_id { 48 struct xfrm_aevent_id {
49 struct xfrm_usersa_id sa_id; 49 struct xfrm_usersa_id sa_id;
50 xfrm_address_t saddr;
50 __u32 flags; 51 __u32 flags;
52 __u32 reqid;
51 }; 53 };
52 54
53xfrm_usersa_id in this message layout identifies the SA. 55The unique SA is identified by the combination of xfrm_usersa_id,
56reqid and saddr.
54 57
55flags are used to indicate different things. The possible 58flags are used to indicate different things. The possible
56flags are: 59flags are:
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 7907c42bd4e4..088ba8113f7e 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -289,7 +289,9 @@ struct xfrm_usersa_id {
289 289
290struct xfrm_aevent_id { 290struct xfrm_aevent_id {
291 struct xfrm_usersa_id sa_id; 291 struct xfrm_usersa_id sa_id;
292 xfrm_address_t saddr;
292 __u32 flags; 293 __u32 flags;
294 __u32 reqid;
293}; 295};
294 296
295struct xfrm_userspi_info { 297struct xfrm_userspi_info {
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 055b72fb37bc..6f97665983d2 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1281,10 +1281,12 @@ static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, struct km_eve
1281 id = NLMSG_DATA(nlh); 1281 id = NLMSG_DATA(nlh);
1282 nlh->nlmsg_flags = 0; 1282 nlh->nlmsg_flags = 0;
1283 1283
1284 id->sa_id.daddr = x->id.daddr; 1284 memcpy(&id->sa_id.daddr, &x->id.daddr,sizeof(x->id.daddr));
1285 id->sa_id.spi = x->id.spi; 1285 id->sa_id.spi = x->id.spi;
1286 id->sa_id.family = x->props.family; 1286 id->sa_id.family = x->props.family;
1287 id->sa_id.proto = x->id.proto; 1287 id->sa_id.proto = x->id.proto;
1288 memcpy(&id->saddr, &x->props.saddr,sizeof(x->props.saddr));
1289 id->reqid = x->props.reqid;
1288 id->flags = c->data.aevent; 1290 id->flags = c->data.aevent;
1289 1291
1290 RTA_PUT(skb, XFRMA_REPLAY_VAL, sizeof(x->replay), &x->replay); 1292 RTA_PUT(skb, XFRMA_REPLAY_VAL, sizeof(x->replay), &x->replay);