Skip to content

Commit 890bb9a

Browse files
Update README.md
1 parent 3dddc86 commit 890bb9a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if (!pp_info_add_azure_linkid(&pp_info_in_v2, 1234))
9999
pp_info_clear(&pp_info_in_v2);
100100
return EXIT_FAILURE;
101101
}
102-
uint8_t *pp2_hdr = pp_create_hdr(2, &pp_info_in_v2, &pp1_hdr_len, &error);
102+
uint8_t *pp2_hdr = pp_create_hdr(2, &pp_info_in_v2, &pp2_hdr_len, &error);
103103
pp_info_clear(&pp_info_in_v2);
104104
if (error != ERR_NULL)
105105
{
@@ -110,7 +110,7 @@ if (error != ERR_NULL)
110110

111111
### Parse a v2 PROXY protocol header
112112
```
113-
rc = pp_parse_hdr(pp2_hdr, pp1_hdr_len, &pp_info_out);
113+
rc = pp_parse_hdr(pp2_hdr, pp2_hdr_len, &pp_info_out);
114114
free(pp2_hdr);
115115
if (!rc)
116116
{
@@ -139,6 +139,7 @@ else
139139
"\tSSL CN: %.*s\n"
140140
"%s %s %hu %hu\n",
141141
rc, linkid,
142+
/* In case CRC32c is wrong then rc < 0 => pp_strerror(rc) at previous block will print the error */
142143
pp_info_out.pp2_info.crc32c == 1 ? "verified" : "not present",
143144
pp_info_get_ssl_version(&pp_info_out, &length),
144145
pp_info_get_ssl_cipher(&pp_info_out, &length),

0 commit comments

Comments
 (0)