Skip to content

Commit 77e12db

Browse files
Yue Haibingkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 32155c6 commit 77e12db

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

net/ipv4/fib_semantics.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,6 @@ int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
625625
if (encap) {
626626
struct lwtunnel_state *lwtstate;
627627

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-
}
633628
err = lwtunnel_build_state(net, encap_type, encap,
634629
nhc->nhc_family, cfg, &lwtstate,
635630
extack);

0 commit comments

Comments
 (0)