From 9a74d517098037114e55519124dc2868f2542e66 Mon Sep 17 00:00:00 2001 From: QxBytes <39818795+QxBytes@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:29:52 -0800 Subject: [PATCH] fix: disable ipv6 on transparent vlan mode network create (#2419) Disable ipv6 on transparent vlan mode network create --- network/network_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network/network_linux.go b/network/network_linux.go index b45623272f..503bbf1a09 100644 --- a/network/network_linux.go +++ b/network/network_linux.go @@ -98,6 +98,10 @@ func (nm *networkManager) newNetworkImpl(nwInfo *NetworkInfo, extIf *externalInt return nil, errors.Wrap(err, "ipv4 forwarding failed") } logger.Info("Ipv4 forwarding enabled") + if err := nu.UpdateIPV6Setting(1); err != nil { + return nil, errors.Wrap(err, "failed to disable ipv6 on vm") + } + logger.Info("Disabled ipv6") // Blocks wireserver traffic from apipa nic if err := networkutils.BlockEgressTrafficFromContainer(iptables.V4, networkutils.AzureDNS, iptables.TCP, iptables.HTTPPort); err != nil { return nil, errors.Wrap(err, "unable to insert vm iptables rule drop wireserver packets")