[PATCH] route/link: handle RTEXT_FILTER_BRVLAN_COMPRESSED

David Ahern dsa at cumulusnetworks.com
Thu Nov 26 06:20:10 PST 2015


On 11/26/15 6:47 AM, Tobias Jungel wrote:
>>
>> I think this requires an alternative parse_af handler (eg.,
>> parse_af_full) that is passed the full nested attribute.
>>
>
> Yes, that's what I had done in my original patch. So we would call
> either parse_af or parse_af_full depending which one is existing?
>
> If this assumption is fine I can give it a try.

In parse_af_spec_bridge(), this:

+	if (af_ops && af_ops->ao_parse_af) {
+		nla_for_each_nested(af_attr, attr, remaining) {
+			err = af_ops->ao_parse_af(link, af_attr, af_data);
+			if (err < 0)
+				goto errout;
+		}
+	}

would become

+	if (af_ops && af_ops->ao_parse_af_full) {
+		err = af_ops->ao_parse_af_full(link, attr, af_data);
+		if (err < 0)
+			goto errout;
+	}

and then the full handler does the for_each_nested and the processing 
you have in this patch.

David



More information about the libnl mailing list