X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib%2Fsrc%2Fvlan.c;fp=lib%2Fsrc%2Fvlan.c;h=962f2f2e0c5dbc280aa8396ca708c1f398447443;hb=cd6887a8eb84465d54ccf2065369796cca453315;hp=441e142a1e4a4bd2fad71ce948bf7d1097198d25;hpb=6530d9b21fffc8f72b9600d605ee20479513984a;p=ngadmin diff --git a/lib/src/vlan.c b/lib/src/vlan.c index 441e142..962f2f2 100644 --- a/lib/src/vlan.c +++ b/lib/src/vlan.c @@ -32,7 +32,7 @@ int ngadmin_getVLANType (struct ngadmin *nga, int *t) *t = VLAN_DISABLED; if (attr->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } at = attr->first->data; @@ -93,7 +93,7 @@ int ngadmin_getVLANPortConf (struct ngadmin *nga, unsigned char *ports) filterAttributes(attr, ATTR_VLAN_PORT_CONF, ATTR_END); if (attr->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -104,7 +104,7 @@ int ngadmin_getVLANPortConf (struct ngadmin *nga, unsigned char *ports) avc = at->data; if (at->size < sizeof(struct attr_vlan_conf) + sa->ports) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -155,7 +155,7 @@ int ngadmin_setVLANPortConf (struct ngadmin *nga, const unsigned char *ports) filterAttributes(conf_old, ATTR_VLAN_PORT_CONF, ATTR_END); if (conf_old->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -168,7 +168,7 @@ int ngadmin_setVLANPortConf (struct ngadmin *nga, const unsigned char *ports) avc_old = at->data; if (at->size < sizeof(struct attr_vlan_conf) + sa->ports) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; free(avc_new); goto end; } @@ -241,7 +241,7 @@ int ngadmin_getVLANDotAllConf (struct ngadmin *nga, unsigned short *vlans, unsig filterAttributes(attr, ATTR_VLAN_DOT_CONF, ATTR_END); if (attr->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -253,7 +253,7 @@ int ngadmin_getVLANDotAllConf (struct ngadmin *nga, unsigned short *vlans, unsig avc = at->data; if (at->size < sizeof(struct attr_vlan_conf) + sa->ports) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -303,7 +303,7 @@ int ngadmin_getVLANDotConf (struct ngadmin *nga, unsigned short vlan, unsigned c filterAttributes(attr, ATTR_VLAN_DOT_CONF, ATTR_END); if (attr->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -314,7 +314,7 @@ int ngadmin_getVLANDotConf (struct ngadmin *nga, unsigned short vlan, unsigned c avc = at->data; if (at->size < sizeof(struct attr_vlan_conf) + sa->ports) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } @@ -375,12 +375,12 @@ int ngadmin_setVLANDotConf (struct ngadmin *nga, unsigned short vlan, const unsi /* check if the switch is in 802.1Q mode */ if (attr->first == NULL) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } else { at = attr->first->data; if (at->size < sizeof(struct attr_vlan_conf) + sa->ports) { - ret = ERR_INVARG; + ret = ERR_BADREPLY; goto end; } }