Re: [PATCH net-next 01/12] ipvlan: Support MACNAT mode

From: Paolo Abeni

Date: Thu Nov 27 2025 - 03:24:20 EST


On 11/27/25 9:13 AM, Dmitry Skorodumov wrote:
> On 25.11.2025 15:58, Paolo Abeni wrote:
>> On 11/20/25 6:49 PM, Dmitry Skorodumov wrote:
>>> @@ -597,6 +690,9 @@ int ipvlan_link_new(struct net_device *dev, struct rtnl_newlink_params *params,
>>> port = ipvlan_port_get_rtnl(phy_dev);
>>> ipvlan->port = port;
>>>
>>> + if (data && data[IFLA_IPVLAN_FLAGS])
>>> + port->flags = nla_get_u16(data[IFLA_IPVLAN_FLAGS]);
>> This looks like a change of behavior that could potentially break the
>> user-space.
>> Hm... What am I missing? The intention was to know "mode" a bit earlier
> and generate MAC as random for macnat-mode.. it's supposed to be just
> a simple line move a bit upper in the code

I misread the code, and I wrongly thought that the new location was
before `port->flags` initialization, but it's not the case.

The comment removal did not help. Please preserve the comment above the
relevant statement/assignment.

Thanks,

Paolo