Pavel Emelianov wrote:
> Patrick McHardy wrote:
>
>>Pavel Emelianov wrote:
>>
>>>+ if (data != NULL && data[VETH_INFO_PEER] != NULL) {
>>>+ err = nla_parse_nested(tb, IFLA_INFO_MAX,
>>>+ data[VETH_INFO_PEER], ifla_policy);
>>>+ if (err < 0)
>>>+ return err;
>>>+ }
>>
>>
>>One more suggestion regarding the PEER attribute: you only nest
>>IFLA attributes below it, but some information that might be
>>interesting to use on device creation is contained in ifinfomsg
>>(flags and ifindex). So I think it would be better to use a
>>complete message, including header.
>
>
> I don't get it. Can you elaborate, please.
You don't have a struct ifinfomsg for the peer device. At some
point we might want to add support for specifying initial flags
for the device (some easily supportable ones are IFF_PROMISC,
IFF_ALLMULTI, IFF_NOARP) and ideally that should also be possible
for the peer device.
So I suggest you use a complete ifinfomsg including the header
instead of just the attributes for VETH_INFO_PEER.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html