diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2022-03-15 14:26:18 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-16 19:16:57 -0700 |
commit | e077ed58c243afc197bc2a2ba0e1ff61135e4ec2 (patch) | |
tree | 30e3f263c01de30cdcdc4587abb10ac52aa15ff9 /drivers/remoteproc | |
parent | a0bfd73deba1bb3c51e2f208ec03465422af667c (diff) | |
download | linux-e077ed58c243afc197bc2a2ba0e1ff61135e4ec2.tar.bz2 |
bareudp: use ipv6_mod_enabled to check if IPv6 enabled
bareudp_create_sock() use AF_INET6 by default if IPv6 CONFIG enabled.
But if user start kernel with ipv6.disable=1, the bareudp sock will
created failed, which cause the interface open failed even with ethertype
ip. e.g.
# ip link add bareudp1 type bareudp dstport 2 ethertype ip
# ip link set bareudp1 up
RTNETLINK answers: Address family not supported by protocol
Fix it by using ipv6_mod_enabled() to check if IPv6 enabled. There is
no need to check IS_ENABLED(CONFIG_IPV6) as ipv6_mod_enabled() will
return false when CONFIG_IPV6 no enabled in include/linux/ipv6.h.
Reported-by: Jianlin Shi <jishi@redhat.com>
Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20220315062618.156230-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
0 files changed, 0 insertions, 0 deletions