struct _lldpctl_atom_custom_t *custom =
(struct _lldpctl_atom_custom_t *)atom;
+ /* Only local port can be modified */
+ if (!custom->parent->local) {
+ SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
+ return NULL;
+ }
+
switch (key) {
case lldpctl_k_custom_tlv_oui_subtype:
if (value < 0 || value > 255) goto bad;
struct _lldpctl_atom_custom_t *custom =
(struct _lldpctl_atom_custom_t *)atom;
+ /* Only local port can be modified */
+ if (!custom->parent->local) {
+ SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
+ return NULL;
+ }
+
switch (key) {
case lldpctl_k_custom_tlv_oui:
memcpy(&custom->tlv->oui, buf, min(n, sizeof(custom->tlv->oui)));