Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnet: tcp/udp input s/csum/verify #345

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/cnet/tcp/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tcp_input_lookup(struct cne_node *node, pktmbuf_t *m, struct pcb_hd *hd)
struct pcb_key key = {0};
struct pcb_entry *pcb;
struct cnet_metadata *md;
int16_t csum;
int16_t verify;
int a_family, a_len;
struct pcb_entry *pcb2;

Expand Down Expand Up @@ -96,10 +96,10 @@ tcp_input_lookup(struct cne_node *node, pktmbuf_t *m, struct pcb_hd *hd)
if (likely(pcb)) {
int rc = TCP_INPUT_NEXT_PKT_DROP;
if (is_pcb_dom_inet6(pcb))
csum = cne_ipv6_udptcp_cksum_verify(l3, tcp);
verify = cne_ipv6_udptcp_cksum_verify(l3, tcp);
else
csum = cne_ipv4_udptcp_cksum_verify(l3, tcp);
if (csum < 0)
verify = cne_ipv4_udptcp_cksum_verify(l3, tcp);
if (verify < 0)
return rc;

m->userptr = pcb;
Expand Down
8 changes: 4 additions & 4 deletions lib/cnet/udp/udp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ udp_input_lookup(pktmbuf_t *m, struct pcb_hd *hd)
struct pcb_key key = {0};
struct pcb_entry *pcb;
struct cnet_metadata *md;
int16_t csum;
int16_t verify;
int a_family, a_len;
struct pcb_entry *pcb2;

Expand Down Expand Up @@ -100,11 +100,11 @@ udp_input_lookup(pktmbuf_t *m, struct pcb_hd *hd)
if (likely(pcb)) {
if ((pcb->opt_flag & UDP_CHKSUM_FLAG) && udp->dgram_cksum) {
if (is_pcb_dom_inet6(pcb))
csum = cne_ipv6_udptcp_cksum_verify(l3, udp);
verify = cne_ipv6_udptcp_cksum_verify(l3, udp);
else {
csum = cne_ipv4_udptcp_cksum_verify(l3, udp);
verify = cne_ipv4_udptcp_cksum_verify(l3, udp);
}
if (csum < 0)
if (verify < 0)
return UDP_INPUT_NEXT_PKT_DROP;
}
m->userptr = pcb;
Expand Down
Loading