]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: fix typo in SNMP checks with protocol identity
authorVincent Bernat <vincent@bernat.im>
Thu, 14 May 2015 22:51:57 +0000 (00:51 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 14 May 2015 22:51:57 +0000 (00:51 +0200)
src/daemon/agent.c
tests/check_snmp.c

index b22cfade7f809d42bde14fa19136a1b8589dd666..b58b4968c96d3b3aaea4fe24895302805954cada 100644 (file)
@@ -454,7 +454,7 @@ header_ppiindexed_table(struct variable *vp, oid *name, size_t *length,
                TAILQ_FOREACH(pi, &hardware->h_lport.p_pids, p_entries) {
                        oid index[2] = { hardware->h_ifindex,
                                         frame_checksum((const u_char*)pi->p_pi,
-                                                       pi->p_pi_len, 0) };
+                                            pi->p_pi_len, 0) };
                        if (header_index_add(index, 2,
                                             pi))
                                return pi;
@@ -480,7 +480,7 @@ header_tprpiindexed_table(struct variable *vp, oid *name, size_t *length,
                                                 hardware->h_ifindex,
                                                 port->p_chassis->c_index,
                                                 frame_checksum((const u_char *)pi->p_pi,
-                                                               pi->p_pi_len, 0) };
+                                                    pi->p_pi_len, 0) };
                                if (header_index_add(index, 4,
                                                     pi))
                                        return pi;
index b0bd45bad35e4da9b99bc80ddcb79027d7bd6e7b..7ff6d1340cae6221d6f877240a06f194b2642f2a 100644 (file)
@@ -277,7 +277,7 @@ struct lldpd_pi pi88cc = {
        .p_pi_len = 2,
 };
 struct lldpd_pi pi888e01 = {
-       .p_pi = "\x88\x8e\e01",
+       .p_pi = "\x88\x8e\x01",
        .p_pi_len = 3,
 };
 #endif
@@ -296,7 +296,6 @@ struct lldpd_port port2 = {
 void
 snmp_config()
 {
-       
        starttime = test_starttime;
        agent_scfg = &test_cfg;
        TAILQ_INIT(&test_cfg.g_chassis);
@@ -333,7 +332,6 @@ snmp_config()
        TAILQ_INSERT_TAIL(&hardware1.h_rports, &hardware2.h_lport, p_entries);
        TAILQ_INIT(&hardware2.h_rports);
        TAILQ_INSERT_TAIL(&hardware2.h_rports, &hardware1.h_lport, p_entries);
-       
 }
 
 /* Convert OID to a string. Static buffer. */
@@ -816,10 +814,10 @@ struct tree_node snmp_tree[] = {
        { { 1, 5, 32962, 1, 2, 3, 1, 2, 3, 1449}, 10, ASN_OCTET_STR,
          { .string = { .octet = "VLAN #1449", .len = 10 }} },
        /* lldpXdot1LocProtocolId */
-       { { 1, 5, 32962, 1, 2, 4, 1, 2, 3, 13175}, 10, ASN_OCTET_STR,
+       { { 1, 5, 32962, 1, 2, 4, 1, 2, 3, 30321}, 10, ASN_OCTET_STR,
+         { .string = { .octet = "\x88\x8e\x01", .len = 3 } }},
+       { { 1, 5, 32962, 1, 2, 4, 1, 2, 3, 30515}, 10, ASN_OCTET_STR,
          { .string = { .octet = "\x88\xcc", .len = 2 } }},
-       { { 1, 5, 32962, 1, 2, 4, 1, 2, 3, 29020}, 10, ASN_OCTET_STR,
-         { .string = { .octet = "\x88\x8e\e01", .len = 3 } }},
 
        /* lldpXdot1RemPortVlanId */
        { { 1, 5, 32962, 1, 3, 1, 1, 1, 0, 3, 1}, 11, ASN_INTEGER, { .integer = 0 }},
@@ -839,10 +837,10 @@ struct tree_node snmp_tree[] = {
        { { 1, 5, 32962, 1, 3, 3, 1, 2, 10000, 4, 1, 1449}, 12, ASN_OCTET_STR,
          { .string = { .octet = "VLAN #1449", .len = 10 }} },
        /* lldpXdot1RemProtocolId */
-       { { 1, 5, 32962, 1, 3, 4, 1, 2, 10000, 4, 1, 13175}, 12, ASN_OCTET_STR,
-         { .string = { .octet = "\x88\xcc", .len = 2 } }},
-       { { 1, 5, 32962, 1, 3, 4, 1, 2, 10000, 4, 1, 29020}, 12, ASN_OCTET_STR,
-         { .string = { .octet = "\x88\x8e\e01", .len = 3 } }},
+       { { 1, 5, 32962, 1, 3, 4, 1, 2, 10000, 4, 1, 30321}, 12, ASN_OCTET_STR,
+         { .string = { .octet = "\x88\x8e\x01", .len = 3 } }},
+       { { 1, 5, 32962, 1, 3, 4, 1, 2, 10000, 4, 1, 30515}, 12, ASN_OCTET_STR,
+         { .string = { .octet = "\x88\xcc", .len = 2 } }}
 #endif
 };