ip xfrm state: Allow different selector family

Message ID 51497F01.9030702@gmx.de
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Thomas Egerer March 20, 2013, 9:18 a.m.
My previous commit introduced a patch to allow for states with different
ip address families for selector and id. The must have somehow been a
mixup of the patch I tested and the one I send, so the patch sent breaks
the iproute2 build. This patch fixes this. My apologies.

Signed-off-by: Thomas Egerer <hakke_007@gmx.de>
Hi Stephen, *,

my sincere apologies for breaking the build. But I somehow build and tested
one commit and sent the wrong one to the list. The assignment was wrong.
This commit fixes this bug. My bad,


 ip/xfrm_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index 6ff5b51..c0cf88c 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -296,7 +296,7 @@  static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
 			preferred_family = AF_UNSPEC;
 			xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
-			preferred_family = req.xsinfo.sel;
+			preferred_family = req.xsinfo.sel.family;
 		} else if (strcmp(*argv, "limit") == 0) {
 			xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);