mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
net: fou: remove redundant code in gue_udp_recv
Remove not useful protocol version check in gue_udp_recv since just gue version 0 can hit that code. Moreover remove duplicated hdrlen computation Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c9d52f2169
commit
526bb57a6a
@ -170,9 +170,7 @@ static int gue_udp_recv(struct sock *sk, struct sk_buff *skb)
|
||||
/* guehdr may change after pull */
|
||||
guehdr = (struct guehdr *)&udp_hdr(skb)[1];
|
||||
|
||||
hdrlen = sizeof(struct guehdr) + optlen;
|
||||
|
||||
if (guehdr->version != 0 || validate_gue_flags(guehdr, optlen))
|
||||
if (validate_gue_flags(guehdr, optlen))
|
||||
goto drop;
|
||||
|
||||
hdrlen = sizeof(struct guehdr) + optlen;
|
||||
|
Loading…
Reference in New Issue
Block a user