diff options
| author | Yue Haibing <[email protected]> | 2025-06-25 02:20:59 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-06-27 00:16:03 +0000 |
| commit | 77e12dba07d08080e5124cd9320577f2832a9eab (patch) | |
| tree | 96916a804761db83b3a5ca3a449dd2923ba2d67c | |
| parent | Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf... (diff) | |
| download | kernel-77e12dba07d08080e5124cd9320577f2832a9eab.tar.gz kernel-77e12dba07d08080e5124cd9320577f2832a9eab.zip | |
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]>
| -rw-r--r-- | net/ipv4/fib_semantics.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index f7c9c6a9f53e..a2f04992f579 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -625,11 +625,6 @@ int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc, if (encap) { struct lwtunnel_state *lwtstate; - if (encap_type == LWTUNNEL_ENCAP_NONE) { - NL_SET_ERR_MSG(extack, "LWT encap type not specified"); - err = -EINVAL; - goto lwt_failure; - } err = lwtunnel_build_state(net, encap_type, encap, nhc->nhc_family, cfg, &lwtstate, extack); |
