]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip xfrm state: Allow different selector family
authorThomas Egerer <hakke_007@gmx.de>
Wed, 20 Mar 2013 09:18:43 +0000 (02:18 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 20 Mar 2013 15:11:54 +0000 (08:11 -0700)
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>
ip/xfrm_state.c

index 6ff5b51fd06e3d59ee11ae568a9424775acb7ae8..c0cf88c2f4a7bd3a834df9f41b1b3429d11a64cc 100644 (file)
@@ -296,7 +296,7 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
                        NEXT_ARG();
                        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) {
                        NEXT_ARG();
                        xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);