All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Egerer <hakke_007@gmx.de>
To: netdev@vger.kernel.org
Cc: stephen.hemminger@vyatta.com
Subject: [PATCH] ip xfrm state: Allow different selector family
Date: Sun, 17 Mar 2013 11:56:01 +0100	[thread overview]
Message-ID: <5145A141.8000707@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]


Do not enforce the selector of a state to have the same address family
as the id. This makes it possible to configure inter family states.

Signed-off-by: Thomas Egerer <hakke_007@gmx.de>
---
 ip/xfrm_state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)



[-- Attachment #2: 0001-ip-xfrm-state-Allow-different-selector-family.patch --]
[-- Type: text/x-patch, Size: 588 bytes --]

diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index 8ac3437..aec49d6 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -300,7 +300,9 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
 			xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv);
 		} else if (strcmp(*argv, "sel") == 0) {
 			NEXT_ARG();
+			preferred_family = AF_UNSPEC;
 			xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
+			preferred_family = req.xsinfo.sel;
 		} else if (strcmp(*argv, "limit") == 0) {
 			NEXT_ARG();
 			xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);


             reply	other threads:[~2013-03-17 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 10:56 Thomas Egerer [this message]
2013-03-20  9:18 ` [PATCH] ip xfrm state: Allow different selector family Thomas Egerer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5145A141.8000707@gmx.de \
    --to=hakke_007@gmx.de \
    --cc=netdev@vger.kernel.org \
    --cc=stephen.hemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.