GNOME Bugzilla – Bug 763384
[review] rebase NetworkManager's systemd code, update for lldp API changes, integrate sd-event [th/systemd-lldp-bgo763384]
Last modified: 2016-03-11 08:41:43 UTC
Re-import newest systemd code. As the LLDP API changed, adjust for that. As the code also uses more sd-event functions (sd_event_source_set_enabled), it shows that the approach to reimplementing sd-event based on glib is wrong. Instead integrate sd-event into glib.
Looks OK to me.
+ switch (subtype) { + case LLDP_OUI_802_1_SUBTYPE_PORT_VLAN_ID: +#if 0 + if (sd_lldp_packet_read_port_vlan_id (packets[i], &data16) == 0) { + value = gvalue_new_uint (data16); + g_hash_table_insert (neigh->tlvs, NM_LLDP_ATTR_IEEE_802_1_PVID, value); + } +#endif Isn't it possible to parse these fields with the new API? Pushed 2 fixups. The rest LGTM.
(In reply to Beniamino Galvani from comment #2) > + switch (subtype) { > + case > LLDP_OUI_802_1_SUBTYPE_PORT_VLAN_ID: > +#if 0 > + if > (sd_lldp_packet_read_port_vlan_id (packets[i], &data16) == 0) { > + value = > gvalue_new_uint (data16); > + g_hash_table_insert > (neigh->tlvs, NM_LLDP_ATTR_IEEE_802_1_PVID, value); > + } > +#endif > > Isn't it possible to parse these fields with the new API? Oh, completely forgot about those. Yes, it's be possible... WIP
merged: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e1e428b21e56cad3c50419e3fe2806dbbb21c976