Skip to content

Commit

Permalink
cnet: udp + tcp input small cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan authored and KeithWiles committed Sep 28, 2023
1 parent 0c18646 commit 4e38ed8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/cnet/tcp/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ 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(pktmbuf_mtod(m, void *), tcp);
csum = cne_ipv6_udptcp_cksum_verify(l3, tcp);
else
csum = cne_ipv4_udptcp_cksum_verify(pktmbuf_mtod(m, void *), tcp);
csum = cne_ipv4_udptcp_cksum_verify(l3, tcp);
if (csum < 0)
return rc;

Expand Down
4 changes: 2 additions & 2 deletions lib/cnet/udp/udp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ 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(pktmbuf_mtod(m, void *), udp);
csum = cne_ipv6_udptcp_cksum_verify(l3, udp);
else {
csum = cne_ipv4_udptcp_cksum_verify(pktmbuf_mtod(m, void *), udp);
csum = cne_ipv4_udptcp_cksum_verify(l3, udp);
}
if (csum < 0)
return UDP_INPUT_NEXT_PKT_DROP;
Expand Down

0 comments on commit 4e38ed8

Please sign in to comment.