Skip to content

Commit b1a3246

Browse files
VR: advertise SLAAC prefix only if VR is gateway (apache#91)
1 parent f76b58f commit b1a3246

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

systemvm/debian/opt/cloud/bin/cs/CsVpcGuestNetwork.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,17 @@ def add_radvd_conf(self, entry):
102102
if 'router_guest_ip6' in list(entry.keys()) and entry['router_guest_ip6']:
103103
cidr_size = entry['router_guest_ip6_cidr'].split("/")[-1]
104104
full_addr = entry['router_guest_ip6_gateway'] + "/" + cidr_size
105-
if entry['router_guest_ip6'] is not entry['router_guest_ip6_gateway']:
106-
full_addr = entry['router_guest_ip6_cidr']
107105
self.conf.append("interface %s" % entry['device'])
108106
self.conf.append("{")
109107
self.conf.append(" AdvSendAdvert on;")
110108
self.conf.append(" MinRtrAdvInterval 5;")
111109
self.conf.append(" MaxRtrAdvInterval 15;")
112-
self.conf.append(" prefix %s" % full_addr)
113-
self.conf.append(" {")
114-
self.conf.append(" AdvOnLink on;")
115-
self.conf.append(" AdvAutonomous on;")
116-
self.conf.append(" };")
110+
if entry['router_guest_ip6'] is entry['router_guest_ip6_gateway']:
111+
self.conf.append(" prefix %s" % full_addr)
112+
self.conf.append(" {")
113+
self.conf.append(" AdvOnLink on;")
114+
self.conf.append(" AdvAutonomous on;")
115+
self.conf.append(" };")
117116
if 'dns6' in list(entry.keys()) and entry['dns6']:
118117
for dns in entry['dns6'].split(","):
119118
self.conf.append(" RDNSS %s" % dns)

0 commit comments

Comments
 (0)