Skip to content

Commit

Permalink
Merge pull request #903 from roykingz/devel
Browse files Browse the repository at this point in the history
dpvs: fix ipo option length bug when insert ipo.
  • Loading branch information
ywc689 authored Aug 21, 2023
2 parents eaa67b9 + 89e8c30 commit f016473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ipvs/ip_vs_proto_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ static int insert_ipopt_uoa(struct dp_vs_conn *conn, struct rte_mbuf *mbuf,
struct ipopt_uoa *optuoa;

assert(AF_INET == tuplehash_in(conn).af && AF_INET == tuplehash_out(conn).af);
if ((ip4_hdrlen(mbuf) + sizeof(struct ipopt_uoa) >
if ((ip4_hdrlen(mbuf) + IPOLEN_UOA_IPV4 >
sizeof(struct iphdr) + MAX_IPOPTLEN)
|| (mbuf->pkt_len + sizeof(struct ipopt_uoa) > mtu))
|| (mbuf->pkt_len + IPOLEN_UOA_IPV4 > mtu))
goto standalone_uoa;

/*
Expand Down

0 comments on commit f016473

Please sign in to comment.