public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Sichert" <l.sichert@proxmox.com>
To: "Hannes Laimer" <h.laimer@proxmox.com>,
	"Lukas Sichert" <l.sichert@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH network v4 1/6] sdn: evpn: enable force_forwarding for ipv6 forwarding to subnets
Date: Fri, 16 Oct 2026 18:33:32 +0200	[thread overview]
Message-ID: <DM6EOISMWACQ.1KL9N9VCDEMW3@proxmox.com> (raw)
In-Reply-To: <aoveWjD4UYQPLql7@nana.intra.proxmox.com>

Thanks for the response, comments inline:

On 2026-08-24 09:23, Hannes Laimer <h.laimer@proxmox.com> wrote:

> On 2026-07-27 15:55, Lukas Sichert wrote:
>> +        if ($is_evpn_gateway) {
>> +            #find outgoing ipv6 interface
>> +            my ($outip, $outiface);
>> +            eval {
>> +                ($outip, $outiface) =
>> +                    PVE::Network::SDN::Zones::Plugin::get_local_route_ip('2001:4860:4860::8888');
>> +            };
>> +            if ($@) {
>> +                my $msg = "interface for IPv6 forwarding could not be resolved: $@";
>> +                log_warn($msg);
>> +            } elsif ($outiface) {
>> +                push @iface_config,
>> +                    "post-up echo 1 > /proc/sys/net/ipv6/conf/$outiface/force_forwarding";
>> +                push @iface_config,
>> +                    "post-down echo 0 > /proc/sys/net/ipv6/conf/$outiface/force_forwarding";
>
> our `ifupdown2` is shippes with `ifreload-down-changed=0`, so
> `post-down`s never run on changes (except for vxlan and vlan), so just
> deleting the subnet, will leave the `force_forwarding=1` on the
> `outiface`
>
> sdn apply does run the `post-down` for removed infterfaces, but it also
> runs all the `post-up`s again, so this works not because the `post-down`
> is not executed on delete, but because the `post-up` re-write the `1`
>
> and with a manual `ifdown`, this can actually break things
>
> we should probably drop the `post-down` here, this is at best a no-op,
> and can potentially break things. so this might generally not be the
> place to manage a shared uplinks sysctl..
>
> something like we do in pve-common with `disable_ipv6` could be an
> alternative, on apply we'd have to check if we still need it on the
> uplink interface, then either `=0` or `=1` it

Agreed, a post-up/post-down pair is not the right place to manage a
shared uplink's sysctl. As discussed off-list, the better approach
is to enable it in ifupdown2, mimicking how IPv4 forwarding is
handled: enable it when a gateway is configured or a flag is set.

>
>> +            }
>> +        }
>> +    }
>> +
>>      push @iface_config, "arp-accept on" if $ipv4 || $ipv6;
>>      push @iface_config, "vrf $vrf_iface" if $vrf_iface;
>>      push(@{ $config->{$vnetid} }, @iface_config) if !$config->{$vnetid};
>> @@ -342,6 +367,13 @@ sub generate_sdn_config {
>>              push @iface_config, "bridge_fd 0";
>>              push @iface_config, "mtu $mtu" if $mtu;
>>              push @iface_config, "vrf $vrf_iface";
>> +
>> +            if ($enable_forward_v6) {
>> +                push @iface_config,
>> +                    "post-up echo 1 > /proc/sys/net/ipv6/conf/$brvrf/force_forwarding";
>> +                push @iface_config,
>> +                    "post-down echo 0 > /proc/sys/net/ipv6/conf/$brvrf/force_forwarding";
>> +            }
>>              push(@{ $config->{$brvrf} }, @iface_config) if !$config->{$brvrf};
>
> emitting `force_forwarding` for the zone `vrfbr_` interfaces is bound to
> the first subnet defined on the vnet, if this first one happens to not be
> IPv6, `force_forwarding` is missing there

Thanks for pointing it out, I overlooked this. The 'vrfbr_' creation
happens outside of the subnet loop, but multiple vnets inside a zone
share one 'vrfbr_'. This means if the first vnet in the loop contains no
ipv6 subnet, the 'vrfbr_' does not recieve the 'force_forwarding' flag.





  reply	other threads:[~2026-10-16 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 13:55 [PATCH docs/manager/network/perl-rs v4 0/6] sdn: enable force_forwarding for ipv6 forwarding Lukas Sichert
2026-07-27 13:55 ` [PATCH network v4 1/6] sdn: evpn: enable force_forwarding for ipv6 forwarding to subnets Lukas Sichert
2026-08-24  7:23   ` Hannes Laimer
2026-10-16 16:33     ` Lukas Sichert [this message]
2026-07-27 13:55 ` [PATCH network v4 2/6] sdn: simple: " Lukas Sichert
2026-07-27 13:55 ` [PATCH perl-rs v4 3/6] fabrics: openfabric: enable force_forwarding for ipv6 transit traffic Lukas Sichert
2026-08-24  7:27   ` Hannes Laimer
2026-10-16 15:38     ` Lukas Sichert
2026-07-27 13:55 ` [PATCH perl-rs v4 4/6] fabrics: bgp: " Lukas Sichert
2026-07-27 13:55 ` [PATCH manager v4 5/6] ui: sdn: remove IPv6 forwarding hint from fabric edit window Lukas Sichert
2026-07-27 13:55 ` [PATCH docs v4 6/6] sdn: drop global ipv6 forwarding workaround from OpenFabric docs Lukas Sichert
2026-08-24  7:33 ` [PATCH docs/manager/network/perl-rs v4 0/6] sdn: enable force_forwarding for ipv6 forwarding Hannes Laimer

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=DM6EOISMWACQ.1KL9N9VCDEMW3@proxmox.com \
    --to=l.sichert@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pve-devel@lists.proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal