From 814fe577c725868a00b77c790f3fd7504abf3d9c Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 7 Feb 2017 22:55:26 +0100 Subject: [PATCH] Add IPv6 information to Security Groups --- src/vnm/AddressRange.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/vnm/AddressRange.cc b/src/vnm/AddressRange.cc index fc74222c93..faf161d684 100644 --- a/src/vnm/AddressRange.cc +++ b/src/vnm/AddressRange.cc @@ -1388,6 +1388,7 @@ const int AddressRange::NUM_SG_RULE_ATTRIBUTES = 5; void AddressRange::process_security_rule(VectorAttribute * rule) { + // Persistent attributes for ( int i = 0; i < NUM_SG_RULE_ATTRIBUTES; i++ ) { string st = attr->vector_value(SG_RULE_ATTRIBUTES[i]); @@ -1397,6 +1398,21 @@ void AddressRange::process_security_rule(VectorAttribute * rule) rule->replace(SG_RULE_ATTRIBUTES[i], st); } } + + // Non persistent attributes + string ip6_s; + + if (ula6[1] != 0 || ula6[0] != 0 ) + { + ip6_to_s(ula6, mac, ip6_s); + rule->replace("IP6_ULA", ip6_s); + } + + if (global6[1] != 0 || global6[0] != 0 ) + { + ip6_to_s(global6, mac, ip6_s); + rule->replace("IP6_GLOBAL", ip6_s); + } } /* -------------------------------------------------------------------------- */