Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipv4: fib: Remove unnecessary encap_type check

lwtunnel_build_state() has check validity of encap_type,
so no need to do this before call it.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250625022059.3958215-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Yue Haibing and committed by
Jakub Kicinski
77e12dba 32155c6f

-5
-5
net/ipv4/fib_semantics.c
··· 625 625 if (encap) { 626 626 struct lwtunnel_state *lwtstate; 627 627 628 - if (encap_type == LWTUNNEL_ENCAP_NONE) { 629 - NL_SET_ERR_MSG(extack, "LWT encap type not specified"); 630 - err = -EINVAL; 631 - goto lwt_failure; 632 - } 633 628 err = lwtunnel_build_state(net, encap_type, encap, 634 629 nhc->nhc_family, cfg, &lwtstate, 635 630 extack);