On 7/28/26 6:31 AM, Naveen Yerramneni wrote: > When a Logical_Router_Port has DHCP relay enabled and multiple IPv4 > addresses configured, ovn-northd needs to pick one of them as the > relay agent address (giaddr). This choice was hard-coded to > lrp_networks.ipv4_addrs[0] which depends entirely on internal > ordering. > > The 'networks' column on Logical_Router_Port is an OVSDB set whose > elements are sorted by strcmp() on the raw CIDR strings. > This makes lrp_networks.ipv4_addrs[0] simply whichever CIDR sorts > first as a string, which may not match the address intended as > the "DHCP relay" address of the port. > > Add a new key 'options:dhcpv4_primary_ip' on Logical_Router_Port. > When set, it must be an IPv4 host address that equals one of the > port's configured addresses; ovn-northd then uses that address as > the giaddr in all DHCP relay flows it emits for the port. When > unset, behavior is unchanged: ovn-northd falls back to > lrp_networks.ipv4_addrs[0] (whichever CIDR sorts first as a string), > so existing deployments are unaffected on upgrade. > > If 'options:dhcpv4_primary_ip' is set but is not a valid IPv4 > address or does not match any address in 'networks', ovn-northd > treats it as a misconfiguration: it logs a warning and skips > emitting DHCP relay flows for the port rather than silently falling > back to the default address. > > Reported-by: Dumitru Ceara <[email protected]> > Signed-off-by: Naveen Yerramneni <[email protected]> > Acked-by: Aditya Mehakare <[email protected]> > Acked-by: Huzaifa Calcuttawala <[email protected]> > Acked-by: Lorenzo Bianconi <[email protected]> > Assisted-by: Claude Opus 4.7, Cursor > ---
Hi Naveen, Thanks for the v4! Applied to main. Regards, Dumitru _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
