Comment 8 for bug 1888256

Revision history for this message
Peter (fazy) wrote :

Thanks for the assignment!

I just can't stop thinking on this bug, so I've tried to understand the ra.py.
https://github.com/openstack/neutron/blob/8c80267bb6699c86e10aade13c54b715e1eae1bf/neutron/agent/linux/ra.py

So far, I think, a small change in template generation would be enough.

(I've tried to understand, which value will come in ra_modes, when it's in None state by reading and searching the code, but without luck)

It's possibly not the best, because of the 3 part IF, but something like this should work:

CONFIG_TEMPLATE = jinja2.Template("""interface {{ interface_name }}
{

   {% if (constants.DHCPV6_STATELESS not in ra_modes) and (constants.DHCPV6_STATEFUL not in ra_modes) and (constants.IPV6_SLAAC not in ra_modes) %}
   AdvSendAdvert off;
   {% else %}
   AdvSendAdvert on;
   {% endif %}