All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ip xfrm state: Allow different selector family
@ 2013-03-17 10:56 Thomas Egerer
  2013-03-20  9:18 ` Thomas Egerer
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Egerer @ 2013-03-17 10:56 UTC (permalink / raw)
  To: netdev; +Cc: stephen.hemminger

[-- 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);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-20  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-17 10:56 [PATCH] ip xfrm state: Allow different selector family Thomas Egerer
2013-03-20  9:18 ` Thomas Egerer

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.