[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 5/6] net/eth: Remove now useless size check
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 5/6] net/eth: Remove now useless size check |
Date: |
Tue, 9 Mar 2021 19:27:08 +0100 |
In the previous commit we checked there is enough room
for a ip6_ext_hdr_routing in the buffer.
The ip6_ext_hdr_routing structure starts with a ip6_ext_hdr,
so we already checked that input_size is big enough for a
ip6_ext_hdr :) Remove that now useless check.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
net/eth.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/eth.c b/net/eth.c
index f0c8dfe8df7..e984edcfb0b 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -416,10 +416,6 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int
pkt_frags,
if ((rthdr->rtype == 2) && (rthdr->segleft == 1)) {
size_t bytes_read;
- if (input_size < ext_hdr_offset + sizeof(*ext_hdr)) {
- return false;
- }
-
bytes_read = iov_to_buf(pkt, pkt_frags,
ext_hdr_offset + sizeof(*ext_hdr),
dst_addr, sizeof(*dst_addr));
--
2.26.2
- [PATCH v4 1/6] net/eth: Simplify _eth_get_rss_ex_dst_addr(), (continued)
- [PATCH v4 1/6] net/eth: Simplify _eth_get_rss_ex_dst_addr(), Philippe Mathieu-Daudé, 2021/03/09
- [PATCH v4 2/6] net/eth: Better describe _eth_get_rss_ex_dst_addr's offset argument, Philippe Mathieu-Daudé, 2021/03/09
- [PATCH v4 3/6] net/eth: Initialize input_size variable earlier, Philippe Mathieu-Daudé, 2021/03/09
- [PATCH v4 4/6] net/eth: Check rt_hdr size before casting to ip6_ext_hdr, Philippe Mathieu-Daudé, 2021/03/09
- [PATCH v4 5/6] net/eth: Remove now useless size check,
Philippe Mathieu-Daudé <=
- [PATCH v4 6/6] net/eth: Return earlier in _eth_get_rss_ex_dst_addr(), Philippe Mathieu-Daudé, 2021/03/09